0 votes

Hi, I am making a 3d game with 2d look, and I have a little trouble.

If I have 2 colliders together, and the player on top of them, the camera player(current), start to shake. How to avoid that?

I read about: velocity = moveandslide(velocity, Vector3.UP, true), it is having the issue.

Godot version 3.3.2
in Engine by (37 points)

1 Answer

0 votes

May not be exactly what you're talking about, but.... a problem I ran into in 2D recently, was the KinematicBody2D always interacting in weird ways with any RigidBody2D. If my character landed on a RigidBody2D it would push it through the floor, but in a weird way.
in moveandslide, if you have infiniteinerta = true (which is by default) try calling the moveandslide with infiniteinertia=false. This fixed that issue for me.

Vector3 moveandslide ( Vector3 linearvelocity, Vector3 updirection=Vector3( 0, 0, 0 ), bool stoponslope=false, int maxslides=4, float floormax_angle=0.785398, bool infinite_inertia=true )

by (75 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.