#No collision between objects
1 messages · Page 1 of 1 (latest)
Player:
Boundry
The Movment is by the "New" input system by this script
using UnityEngine;
using UnityEngine.InputSystem;
public class Movement : MonoBehaviour
{
Rigidbody2D playerrb;
float movementSpeed = 5f;
void Start()
{
playerrb = GetComponent<Rigidbody2D>();
}
public void Move(InputAction.CallbackContext context){
playerrb.velocity = new Vector2(context.ReadValue<Vector2>().x * movementSpeed, 0);
}
}
can you show me your polygon collider in game?
ah alright
Yes scren
gotcha
So player can't go off it
try setting your player to Dynamic and turning off gravity for a second
Active? Dynamic u mean?
Yea on Dynamic it's working
nice
But then, why the option for Collision between Static/Kinematic exist?
must be some better way to implement it
The is this special field
to enable Kinematic/statick collision
and it's checked for me
but don;t change anything :/
you could try using MovePosition instead, but I'm not 100% sure if it will help