Is there a way to control first person character using velocity instead of translate?

When I use translate, my character goes through the walls.

I’ve tried moving the character using Apply Impulse, but the character stutters along the floor like it hits a bump every so often.

I have tried a box collider and a capsule collider on my main character. My terrain and walls are passive rigid bodies and the main character is a dynamic active rigid body.

I’ve tried moving the character using Set Velocity… but the character falls forward onto the floor. I’ve set angular rotation to 0 on each axis on the rigid body physics settings but it will still fall over.

I am doing something wrong, could anyone possibly help?

I made the first-person character moved by translation node, but when he walks toward walls he starts jerking like he’s trying pass through the wall, but physics do not allow him.
But it looks ugly anyway, so I have decided to make a character moved by physicks force.
If I remember correctly the character in old good Half-Life 2 worked the same way.


But this thing is not complete yet. I need to set a boolean operation so that the force could be applied only if the speed of the character is less than a certain value, depending on how fast I want my character to move.
I am working on it, and I’m gonna upload a screenshot with the complete version :slightly_smiling_face:

1 Like

Ah cool, thank you. Really looking forward to trying this.

I may attempt the Boolean with a Get Velocity node and a Compare node I think to keep the speed to a limit to see if it works. I think the Vector Clamp to Size node may work also? I’ll try as well.

I couldn’t get it to work :thinking: I’ll keep trying.

Do you know how the Character Motion setting on BGE worked? Are you able to code a node like that? :grinning:

Ah it’s alright now :grinning: I applied the scale and made everything smaller and reduced the speed, and changed the collider into a capsule collider. My character runs up to the walls pretty fast and never goes through them now. Really glad about this as I had been trying all sorts for the past 2 days.

I am still trying to get it working using physics and it works but it goes through animated doors don’t know why I need to find out.

Is your character twitching when you walk against the wall?

I think I have got the twitching to stop. I’ll have a look over my settings tomorrow and test it out a bit more and at faster speeds. Using the translate node with a local axis setting I got from an updated master pack on github, my character runs up to walls and stops flat like it did in BGE with the Character Motion logic brick setting. I was experiencing the twitching before so I was very surprised tonight when it was just working well.

1 Like

Hmm I wonder why it’s going through animated doors. I’m porting over a project from BGE full of doors that open with a flipper animation… I’ll let you know if I experience the same issue :grinning:

1 Like