r/Unity3D – Telegram
r/Unity3D
265 subscribers
12.7K photos
15.6K videos
14 files
48.1K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
How do I apply an image of say a grassy floor to my platforms in my games?

Every platform is a 2d square?

https://redd.it/1gjymu0
@r_Unity3D
New to Unity, anyone know why the character has a seizure instead of having a smooth animation?

https://gyazo.com/6c93df368ec1ee18d3162956568e9fa9

Sometimes the character spasms like the gif up there, sometimes it's smooth. Below are my settings. The character has the ability to rotate with user input but I don't do it in the clip

Player's Rigidbody

Ground settings

Anyone knows what's up? Thanks :)


EDIT:

public class PlayerController : MonoBehaviour
{
private Rigidbody2D rb2D;

SerializeField
private float torqueAmount = 25f;

void Start()
{
rb2D = GetComponent<Rigidbody2D>();
}

void FixedUpdate()
{
if(Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow))
{
rb2D.AddTorque(torqueAmount);
}
else if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow))
{
rb2D.AddTorque(-torqueAmount);
}
}
}

https://redd.it/1gjz6mk
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
One year making Sky Harvest, I call it open-world and cozy but for me, it's also a sleep deprivation simulator. [Please consider Wishlisting on Steam. Thanks 💘]

https://redd.it/1gk34v0
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
My game is finished after two years of development. I'm excited because it's going to be released on November 8th

https://redd.it/1gk2wq3
@r_Unity3D
How is the game from the outside, honestly please? If it is unappealing, what could we improve? It is a Divinity OS inspired Tactical Turn-Based RPG with basebuilding and 4X elements. 3 games in 1

https://redd.it/1gk5pys
@r_Unity3D
Does AI help in game development process? Survey.

Hi, I am a student from Latvia. I have a project about - "Artificial intelligence in optimization of the game development process. " So I have created this survey and I need help (if possible) from all of you! If you are a game developer or just a gamer I would be really happy to hear your thoughts in this survey.

Link to the survey

https://redd.it/1gk7007
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
My best friend was an underwater welder on a deep-sea oil rig in the North Sea. He passed away from a heart attack just a year after he retired. I’m creating the game Weldiver to honor his memory.

https://redd.it/1gk8zce
@r_Unity3D
How do I copy a score into a different scene

Helloo I'm new to coding and I need help. I need to put the score from one scene (game scene) to another scene (respawn scene) and I don't know how to do that.

[Scene 1](https://preview.redd.it/7amd8cqow3zd1.png?width=907&format=png&auto=webp&s=4f088a6a22c4884102cd16450194693dda63456f)

[Scene 2](https://preview.redd.it/8jkes6kjw3zd1.png?width=910&format=png&auto=webp&s=c7fd178ac8b4034ba0ffbcbe7f6caa538df1f4ec)

Player movement with scoring code:
And "Scoring" Script (I tried following a tutorial but I don't get it)

using JetBrains.Annotations;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class Controller : MonoBehaviour
{

public Animator animator;
private Rigidbody2D rb2d;
private float moveInput;
private float speed = 10f;

private bool isStarted = false;

private float topScore = 0.0f;

public Text pointsText;
public Text startText;


// Start is called before the first frame update
void Start()
{

rb2d = GetComponent<Rigidbody2D>();

rb2d.gravityScale = 0;
rb2d.linearVelocity = Vector3.zero;


}

void Update()
{

if(Input.GetKeyDown(KeyCode.Space) && isStarted == false)
{

isStarted = true;
startText.gameObject.SetActive(false);
rb2d.gravityScale = 5f;

}

if (isStarted == true)
{

if (moveInput < 0)
{

this.GetComponent<SpriteRenderer>().flipX = false;

}
else
{

this.GetComponent<SpriteRenderer>().flipX = true;

}

if (rb2d.linearVelocity.y > 0 && transform.position.y > topScore)
{

topScore = transform.position.y;

}

pointsText.text = "Score: " + Mathf.Round(topScore).ToString();

}

}

public void AddPoints()
{
Scoring.topScore += //HELPPPPPPPP;
}

public void GetPoints ()
{
int recievedPoints = Scoring.topScore;
pointsText.text = recievedPoints.ToString();
}

void FixedUpdate()
{
animator.SetFloat("Speed", Mathf.Abs(moveInput));

if (isStarted == true)
{

moveInput = Input.GetAxis("Horizontal");
rb2d.linearVelocity = new Vector2(moveInput * speed, rb2d.linearVelocity.y);

}

if (transform.position.y + 30 < topScore)
{
SceneManager.LoadScene("GameOver");
}

}
}


using UnityEngine;
using System.Collections;

public class Scoring : MonoBehaviour
{
public static int topScore;
}


https://redd.it/1gka86j
@r_Unity3D