Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Try this:

https://sendgb.com/ydtu1l6ebiZ

Moved translate to every tick (to enable gravity, -10 to z). Change down to set x value. Add ground for character to move on. Also changed project to regular z instead of normalized z. Do not use normalized z for 3d project. Also sort based on camera distance for 3d layer (for 3d project).

it worked, but only when i put the ground with dynamic physic and turn on immovable, that wasn't clear lol, so the physic only work when you put one object with dynamics? put this in the description please , i was totaly lost until know this lol.

(1 edit)

You don't need the ground, but for me it feels better to me to have a ground and some fake gravity for a kinematic character controller. You can delete the ground in my example and the 'D' movement still works (but it will be falling due to the fake gravity.)

For some more info about character controllers in general see: https://rapier.rs/docs/user_guides/javascript/character_controller

(This is the physics library embedded in this addon, a subset of the many features are exposed to C3 right now.)

theres is a way to change the directions of player relative to camera?

You can try setting the x,y,z translation to the camera view direction (see camera3d view direction), experiment with that.