[Solved] How to apply forces to a player

Hi.
I used the BetterCharacterControl example, from Jmonkeyengine 3.0 Beginners Guide, to program a car. The problem is that the car only moves when I press the keys, (no inertia), moves at a constant speed with no acceleration, and it stops suddenly whe I release the key.
So, I’m wondering, do I have to code inertia, acceleration, friction and all the forces I want to affect it, or is there any method/class that can do it for me?

Thanks for reading.

1 Like

Writing your question another way:
“Hi, I’m using the control for walking characters for my car. Is there any way to make the control written for walking characters work for vehicles instead even though that’s almost 100% different than anything to do with walking?”

Short but unhelpful answer: no

Short but possibly more helpful answer:
http://javadoc.jmonkeyengine.org/com/jme3/bullet/control/VehicleControl.html

You’d just need to remove the damping in BCC. But yeah, kinda dumb using a character class for vehicles when theres a vehicle class.

If I were dumb, I would expect to everyone known all classes about the engine they’re learning.

Because I didn’t know such class, maybe.

Yeah, we turn into total assholes sometimes with the same questions over and over again because people don’t bother to even glance through the tutorials:
https://jmonkeyengine.github.io/wiki/jme3/advanced/vehicles.html

7-8 years of answering the same questions that have already been documented make us look for ways to be a little entertaining when providing the same answers again and again. It’s less boring that way.

But I’ll keep that in mind in the future. You’d rather we didn’t answer your posts and wait for someone else. That’s fine.

Being dumb and doing dumb things is not the same. I do dumb things all the time.

2 Likes

If you read above, I said I’m learning from a book that doesn’t have anything about that control.
I already searched in the forum and google, and there was no similar question.
If you don’t want to help newbies, you don’t have to do that, not to mention that you don’t need to be jerks. Spend your free time doing something productive or something that you like.

Heh, so we shouldn’t have spent our free time writing the software you use? It’s true - then this wouldn’t have happened. :slight_smile:

We’re only jerks if you think we are :wink:

1 Like

From your username, I guess you’re a fellow italian monkey? Welcome aboard :slight_smile:

Be warned: your book might not be updated with critical information, like:

  • do NOT use jme SDK 3.0
  • do NOT use Spatials as game object (yes, I know most tutorials says otherwise)
  • the sooner you learn gradle, the better
  • when you run into trouble, your best friends are @normen (for physics), @nehon (for scenegraph and shaders), @pspeed (for both and everything else). Btw, congratulations for pissing off 2 of them on your first post!
2 Likes

But don’t give up, I’m not pissed off…
I’m the good cop around here.

4 Likes

Spanish not Italian.

his first post was [Solved] Linux Installation Failed
but still for the second post that’s an achievement.

3 Likes

I don’t think anyone is pissed off except LaPsicopata :wink:

wait a sec that’s sound like psychopath…
after a quick google search turn’s out it’s TRUE it’s in Spanish that’s sound more as a gamer name not as a developer name.

Oh, thanks for that, I hid that joke too well :wink: