This media is not supported in your browser
VIEW IN TELEGRAM
Made first-person character movement functionality in our survival game
https://redd.it/1jwwfnd
@r_Unity3D
https://redd.it/1jwwfnd
@r_Unity3D
Is tile maps the only way to create the map?
I’m struggling with water animation and different levels of terrain, I’m about to start them but wondering if there’s anything better than tile maps for it?
https://redd.it/1jwzkec
@r_Unity3D
I’m struggling with water animation and different levels of terrain, I’m about to start them but wondering if there’s anything better than tile maps for it?
https://redd.it/1jwzkec
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Object's Rigidbody rotation gets changed but then immediately resets to 0.
I had this code that sets the rotation of an object. it is called from another noscript and calls this code
public void TurnToDirection(Vector2 dir)
{
Debug.Log("Changing rotation from this: " + rb.rotation);
float rot = data.TurnToDirection(dir);
rb.rotation = rot;
Debug.Log("Changed rotation from this: " + rb.rotation);
}
data.TurnToDirection(dir) calls this (makes calling this function from another noscript easier)
public float TurnToDirection(Vector2 dir){
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
return angle - 90f;
}
This code had completely worked before but now for some reason it wont, as the rb.rotation is still 0 after the function. As you can see I added Debug.Logs to see what was going on, but the rb.rotation in the log was actually completely correct and worked as intended, by the actual rotation in PlayModestayed 0 (and I put the Debug.Log in other functions and for some reason they are 0, so it just immediately goes to 0 after this function). I looked through my noscripts and there was no where else where my rb.roatation was changed besides here and I know the rb isn't null or referencing the wrong object. What is going on here then?
https://redd.it/1jx3jv9
@r_Unity3D
I had this code that sets the rotation of an object. it is called from another noscript and calls this code
public void TurnToDirection(Vector2 dir)
{
Debug.Log("Changing rotation from this: " + rb.rotation);
float rot = data.TurnToDirection(dir);
rb.rotation = rot;
Debug.Log("Changed rotation from this: " + rb.rotation);
}
data.TurnToDirection(dir) calls this (makes calling this function from another noscript easier)
public float TurnToDirection(Vector2 dir){
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
return angle - 90f;
}
This code had completely worked before but now for some reason it wont, as the rb.rotation is still 0 after the function. As you can see I added Debug.Logs to see what was going on, but the rb.rotation in the log was actually completely correct and worked as intended, by the actual rotation in PlayModestayed 0 (and I put the Debug.Log in other functions and for some reason they are 0, so it just immediately goes to 0 after this function). I looked through my noscripts and there was no where else where my rb.roatation was changed besides here and I know the rb isn't null or referencing the wrong object. What is going on here then?
https://redd.it/1jx3jv9
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Player animation shakes when moving in only one direction.
Hello
I have an issue that my player sprite shake if I go to left but never if I go to right :/
I attached a video but we don't see the bug in it. It's record in 60 FPS.
My friend with another PC has the same issue than me.
I try to limit frame rate to 360 Hz but same issue.
I put below the configuration of my RigidBody2D attach to my player gameobject:
https://preview.redd.it/fq0eo65ei9ue1.png?width=614&format=png&auto=webp&s=9144288b2c86ed5f1cbf19fee6cccff1ee0cf46d
https://redd.it/1jwzafz
@r_Unity3D
Hello
I have an issue that my player sprite shake if I go to left but never if I go to right :/
I attached a video but we don't see the bug in it. It's record in 60 FPS.
My friend with another PC has the same issue than me.
I try to limit frame rate to 360 Hz but same issue.
I put below the configuration of my RigidBody2D attach to my player gameobject:
https://preview.redd.it/fq0eo65ei9ue1.png?width=614&format=png&auto=webp&s=9144288b2c86ed5f1cbf19fee6cccff1ee0cf46d
https://redd.it/1jwzafz
@r_Unity3D
Struggling to make Ninja do a 360° Somersault on a double jump in unity 2D
I'm building a 2D side-scrolling ninja game in Unity and I've hit a wall. I’ve been trying to implement a self-axis somersault (like in *Ninja Arashi 2*) when the player performs a **double jump** — where the ninja flips 360° around their own center point, not in a circular path.
So far, I’ve only managed to give the ninja a working double jump, and I’ve made it rotate while in the jump pose — but it's not the proper somersault I want. The character just spins while in the jump animation, and it doesn’t look right.
I’ve spent the last 3 days trying different approaches, and I even asked ChatGPT. It gave me detailed advice about combining animation and noscripting, but I'm still struggling to make it work the way I want.
I'm an intermediate Unity user, and I just need a clear and clean way to make the character:
* Switch to a somersault pose on the second jump
* Rotate 360° around its own pivot (not move in a circular arc)
* Then return to the normal jump pose before landing
Any help, ideas, or examples or step by step guide would be massively appreciated!
https://redd.it/1jx9edq
@r_Unity3D
I'm building a 2D side-scrolling ninja game in Unity and I've hit a wall. I’ve been trying to implement a self-axis somersault (like in *Ninja Arashi 2*) when the player performs a **double jump** — where the ninja flips 360° around their own center point, not in a circular path.
So far, I’ve only managed to give the ninja a working double jump, and I’ve made it rotate while in the jump pose — but it's not the proper somersault I want. The character just spins while in the jump animation, and it doesn’t look right.
I’ve spent the last 3 days trying different approaches, and I even asked ChatGPT. It gave me detailed advice about combining animation and noscripting, but I'm still struggling to make it work the way I want.
I'm an intermediate Unity user, and I just need a clear and clean way to make the character:
* Switch to a somersault pose on the second jump
* Rotate 360° around its own pivot (not move in a circular arc)
* Then return to the normal jump pose before landing
Any help, ideas, or examples or step by step guide would be massively appreciated!
https://redd.it/1jx9edq
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
How do I fix the quality of my sprite?
unity editor \/ gimp
I know it's a pretty simple question, but I spent a while and got frustrated. How do I fix the quality of my sprite?
I know that the effect that the image has is compression, but I see that I already deactivated it, I thought it was because it was a png, but I have another image here which did work for me.
This project is only a university project, I am interested in knowing good practices, but as long as it has the desired quality I am satisfied.
I will appreciate any comments that try to help :D
inspector unity
https://redd.it/1jxa6yi
@r_Unity3D
unity editor \/ gimp
I know it's a pretty simple question, but I spent a while and got frustrated. How do I fix the quality of my sprite?
I know that the effect that the image has is compression, but I see that I already deactivated it, I thought it was because it was a png, but I have another image here which did work for me.
This project is only a university project, I am interested in knowing good practices, but as long as it has the desired quality I am satisfied.
I will appreciate any comments that try to help :D
inspector unity
https://redd.it/1jxa6yi
@r_Unity3D
Unity 2D platformer tileset packs like Dead Cells
I want to make a dead cells like game and so far I have made the character controls and enemy types but I couldn't find the right tileset for my game. Are there any free or cheap (under 10 dollars) tileset packs you can recommend? I'm currently looking for a good dungeon tileset pack
https://redd.it/1jxc817
@r_Unity3D
I want to make a dead cells like game and so far I have made the character controls and enemy types but I couldn't find the right tileset for my game. Are there any free or cheap (under 10 dollars) tileset packs you can recommend? I'm currently looking for a good dungeon tileset pack
https://redd.it/1jxc817
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
This media is not supported in your browser
VIEW IN TELEGRAM
We're adding gamepad support to lost host, maybe the project will appear on Хbох or PlayStation in the future? :)
https://redd.it/1jxb2vn
@r_Unity3D
https://redd.it/1jxb2vn
@r_Unity3D
Why using everytime int and float and not short and double for declarations of attributes ?
Hello,
I ask me the question why people never using short and double when creating a video game ? It would be a little more optimized for the memory space no ?
https://redd.it/1jxdzc9
@r_Unity3D
Hello,
I ask me the question why people never using short and double when creating a video game ? It would be a little more optimized for the memory space no ?
https://redd.it/1jxdzc9
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
In-progress Level Design for LUCID! I Love MAKING the Game Almost as Much as I Love PLAYING It.
https://www.youtube.com/watch?v=VSw2obtsRYo
https://redd.it/1jxlv8m
@r_Unity3D
https://www.youtube.com/watch?v=VSw2obtsRYo
https://redd.it/1jxlv8m
@r_Unity3D
YouTube
In-Progress Level Design for LUCID! I Love MAKING the Game Almost as Much as I Love PLAYING It.
If you listen really closely, you can hear my sweaty gamer keyboard clickings 🤣🎮
If this looks cool, please Add LUCID to your Steam Wishlist! Really helps this small indie dev out :)
https://store.steampowered.com/app/1717730/LUCID/
If this looks cool, please Add LUCID to your Steam Wishlist! Really helps this small indie dev out :)
https://store.steampowered.com/app/1717730/LUCID/
Unity Ads not loading reliably in poor signal areas — any mobile devs tackled this?
Hi everyone,
I’m using Unity Ads in a mobile game and am running into issues when a player has poor signal or unstable internet. The ad doesn’t load, there’s no visible error, and nothing triggers the failure callback. But if the player restarts the app, suddenly the ad shows up.
I’m currently preloading with Advertisement.Load(), and retrying after OnUnityAdsFailedToLoad fires (when it does). But it’s inconsistent.
Should I be setting up a watchdog or retry loop manually?
How do you handle this kind of network flakiness in your games?
Thanks in advance!
https://redd.it/1jxocdc
@r_Unity3D
Hi everyone,
I’m using Unity Ads in a mobile game and am running into issues when a player has poor signal or unstable internet. The ad doesn’t load, there’s no visible error, and nothing triggers the failure callback. But if the player restarts the app, suddenly the ad shows up.
I’m currently preloading with Advertisement.Load(), and retrying after OnUnityAdsFailedToLoad fires (when it does). But it’s inconsistent.
Should I be setting up a watchdog or retry loop manually?
How do you handle this kind of network flakiness in your games?
Thanks in advance!
https://redd.it/1jxocdc
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Unity netcode (ngo) for objects
Hey guys ,
So i was wondering , when creating a multiplayer game with netcode for gameobjects i see that when you close a client the player will despawn (get destroyed) immediately.
I was wondering if there was an easy way to make it not be destroyed immediately but stay in the game for x amount of time for which i could then make a noscript that will save the players stats , info and location before being destroyed?
Thanks for taking the time to read this question.
https://redd.it/1jxpdny
@r_Unity3D
Hey guys ,
So i was wondering , when creating a multiplayer game with netcode for gameobjects i see that when you close a client the player will despawn (get destroyed) immediately.
I was wondering if there was an easy way to make it not be destroyed immediately but stay in the game for x amount of time for which i could then make a noscript that will save the players stats , info and location before being destroyed?
Thanks for taking the time to read this question.
https://redd.it/1jxpdny
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Trying to make my player launch towards an object but it only launches vertically.
Hi, so I have this player movement noscript but when the
using UnityEngine;
using UnityEngine.UIElements;
public class PlayerController : MonoBehaviour
{
private Rigidbody2D RB;
SerializeField private float playerSpeed = 5f;
SerializeField private float jumpForce = 5f;
private float x;
private bool isGrounded;
private bool jumpRequested;
SerializeField private float hookLaunchForce = 10f;
void Start()
{
RB = gameObject.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
x = Input.GetAxisRaw("Horizontal");
if (Input.GetButton("Jump") && isGrounded) {
jumpRequested = true;
Debug.Log("Jump!");
}
if (Input.GetKeyDown(KeyCode.L)) {
launchTowardsHook();
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Ground")) {
isGrounded = true;
Debug.Log("Grounded");
}
}
void FixedUpdate()
{
RB.linearVelocity = new Vector2(playerSpeed x, RB.linearVelocityY);
if (jumpRequested) {
RB.AddForce(new Vector2(0, jumpForce), ForceMode2D.Impulse);
isGrounded = false;
jumpRequested = false;
}
}
void launchTowardsHook()
{
Vector2 direction = (GameObject.FindGameObjectWithTag("BasicHook").transform.position - transform.position).normalized;
Debug.Log("Launch direction: " + direction);
RB.AddForce(direction hookLaunchForce, ForceMode2D.Impulse);
}
}
using UnityEngine;
using UnityEngine.UIElements;
public class PlayerController : MonoBehaviour
{
private Rigidbody2D RB;
SerializeField private float playerSpeed = 5f;
SerializeField private float jumpForce = 5f;
private float x;
private bool isGrounded;
private bool jumpRequested;
SerializeField private float hookLaunchForce = 10f;
void Start()
{
RB = gameObject.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
x = Input.GetAxisRaw("Horizontal");
if (Input.GetButton("Jump") && isGrounded) {
jumpRequested = true;
Debug.Log("Jump!");
}
if (Input.GetKeyDown(KeyCode.L)) {
launchTowardsHook();
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Ground")) {
isGrounded = true;
Debug.Log("Grounded");
}
}
void FixedUpdate()
{
RB.linearVelocity = new Vector2(playerSpeed x, RB.linearVelocityY);
if (jumpRequested) {
RB.AddForce(new Vector2(0, jumpForce), ForceMode2D.Impulse);
isGrounded = false;
jumpRequested = false;
}
}
void launchTowardsHook()
{
Vector2 direction = (GameObject.FindGameObjectWithTag("BasicHook").transform.position - transform.position).normalized;
Debug.Log("Launch direction: " + direction);
RB.AddForce(direction hookLaunchForce, ForceMode2D.Impulse);
}
}
I know it has something to do with setting the RB.linearVelocity on the fixed update because when I comment that part the launch function works properly.
Hi, so I have this player movement noscript but when the
launchTowardsHook() function is called it only launches the player vertically even though its getting the launch direction correctly. using UnityEngine;
using UnityEngine.UIElements;
public class PlayerController : MonoBehaviour
{
private Rigidbody2D RB;
SerializeField private float playerSpeed = 5f;
SerializeField private float jumpForce = 5f;
private float x;
private bool isGrounded;
private bool jumpRequested;
SerializeField private float hookLaunchForce = 10f;
void Start()
{
RB = gameObject.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
x = Input.GetAxisRaw("Horizontal");
if (Input.GetButton("Jump") && isGrounded) {
jumpRequested = true;
Debug.Log("Jump!");
}
if (Input.GetKeyDown(KeyCode.L)) {
launchTowardsHook();
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Ground")) {
isGrounded = true;
Debug.Log("Grounded");
}
}
void FixedUpdate()
{
RB.linearVelocity = new Vector2(playerSpeed x, RB.linearVelocityY);
if (jumpRequested) {
RB.AddForce(new Vector2(0, jumpForce), ForceMode2D.Impulse);
isGrounded = false;
jumpRequested = false;
}
}
void launchTowardsHook()
{
Vector2 direction = (GameObject.FindGameObjectWithTag("BasicHook").transform.position - transform.position).normalized;
Debug.Log("Launch direction: " + direction);
RB.AddForce(direction hookLaunchForce, ForceMode2D.Impulse);
}
}
using UnityEngine;
using UnityEngine.UIElements;
public class PlayerController : MonoBehaviour
{
private Rigidbody2D RB;
SerializeField private float playerSpeed = 5f;
SerializeField private float jumpForce = 5f;
private float x;
private bool isGrounded;
private bool jumpRequested;
SerializeField private float hookLaunchForce = 10f;
void Start()
{
RB = gameObject.GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
x = Input.GetAxisRaw("Horizontal");
if (Input.GetButton("Jump") && isGrounded) {
jumpRequested = true;
Debug.Log("Jump!");
}
if (Input.GetKeyDown(KeyCode.L)) {
launchTowardsHook();
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Ground")) {
isGrounded = true;
Debug.Log("Grounded");
}
}
void FixedUpdate()
{
RB.linearVelocity = new Vector2(playerSpeed x, RB.linearVelocityY);
if (jumpRequested) {
RB.AddForce(new Vector2(0, jumpForce), ForceMode2D.Impulse);
isGrounded = false;
jumpRequested = false;
}
}
void launchTowardsHook()
{
Vector2 direction = (GameObject.FindGameObjectWithTag("BasicHook").transform.position - transform.position).normalized;
Debug.Log("Launch direction: " + direction);
RB.AddForce(direction hookLaunchForce, ForceMode2D.Impulse);
}
}
I know it has something to do with setting the RB.linearVelocity on the fixed update because when I comment that part the launch function works properly.
Maybe its overriding the horizontal velocity? But if so I wouldn't know how to implement basic movement
https://redd.it/1jxrl7k
@r_Unity3D
https://redd.it/1jxrl7k
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community