I am wondering about using the built-in 2D physics in Godot for use in my platformer. <br /><br />Sure, it may be easier, but in my past experience when making a platformer you generally don't want to use built-in physics, as it can cause some issues.<br /><br />I have done some tests, and I think I can make my own functions to handle collisions and gravity/player movement, but I'm wondering if anyone else has an opinion on this matter. <br /><br />For example, have you used one method over the other? Which do you prefer and recommend?<br /><br />One other reason I may want to avoid the built-in physics is because of apparent jitter that seems to happen inside of Godot. However, I also noticed some slight jitter when using my own code to handle gravity:<br /><br />
<br /><br />extends Sprite<br /><br /><br /># expose gravity var to change in editor<br />export var gravity = 9.8<br /><br /><br />func
ready():<br />&nbsp; set_process(true)<br />&nbsp; <br />func process(delta):<br />&nbsp; # Add gravity to y position<br />&nbsp; var pos = self.get_pos()<br />&nbsp; pos.y += gravity<br />&nbsp; <br />&nbsp; # set the position<br />&nbsp; self.set_pos(pos)<br />
<br /><br />It seems to happen most often when I multiply gravity by delta, like so:<br />pos.y += gravity * delta<br /><br />I will do some other tests and see where I get, but in the meantime I would appreciate your opinion! G: <br /><br />EDIT: I was just about to move this but thanks to whoever did! Didn't realize I hadn't posted it in this section because I had the wrong tab open. I should be more careful with multi-tab browsing!