[SOLVED] Animals (Mobs) in jME

Hello I was wondering how can I make animals.

This is just a short question so here it is:

  • Should I use CharacterControl for animals or just setLocalTranslation. Or is there something made for animals?



    EDIT:

    Solved

    If anyone wants the code feel free to ask, it has all you would need for mobs

animals are still NPC in a game. Nothing special T.T

@skylightspica said:
animals are still NPC in a game. Nothing special T.T

Ya I know but should I use CharacterControl for them or something else?

It depends :roll:

@normen said:
It depends :roll:

Okay I will try that then :)
1 Like

Generally, CharacterControl is better, as it is easier to implement AI with it. Unless you of course want it to travel in straight line or rotate continuously, then it’s unnecessary (but will mess up your update function) ;).

@dariuszg-jagielski said:
Generally, CharacterControl is better, as it is easier to implement AI with it. Unless you of course want it to travel in straight line or rotate continuously, then it's unnecessary (but will mess up your update function) ;).

Thats not true.
@dariuszg-jagielski said:
Generally, CharacterControl is better, as it is easier to implement AI with it. Unless you of course want it to travel in straight line or rotate continuously, then it's unnecessary (but will mess up your update function) ;).

@normen said:
Thats not true.

I don't know people, I tried CharacterControl but it mixes it with my player, I have no idea why :O?
When I move my player the thing also moves but it makes no sense because it's a different class and
it doesn't have any input or anything that would move it. jBullet port error?
@ivandonat said:
jBullet port error?

No, user error, read the manual and do the tutorials, theres one on the character exclusively even.
@normen said:
No, user error, read the manual and do the tutorials, theres one on the character exclusively even.

Hmm so what else can I use to make NPC mobs except setLocalTranslation and applyForce?
@ivandonat said:
Hmm so what else can I use to make NPC mobs except setLocalTranslation and applyForce?

Do I speak Chinese? Do the tutorials for gods sake. :x https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_collision
@normen said:
Do I speak Chinese? Do the tutorials for gods sake. :x https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_collision

What does it have to do with NPC?

It’s about making things move.



By “make npc” what do you actually mean? Do you want to know about AI, physics, animation, what?



Why not read some things, try and make something and then see if you have a more specific question?

@ivandonat said:
I don't know people, I tried CharacterControl but it mixes it with my player, I have no idea why :O?

@ivandonat said:
What does it have to do with NPC?

Are you making fun of us?
@zarch said:
It's about making things move.

By "make npc" what do you actually mean? Do you want to know about AI, physics, animation, what?

Why not read some things, try and make something and then see if you have a more specific question?

I know how to make physics and animation.
I think it's simple to make what I want but don't know where to start.
So basically if I just make an animal (NPC in this case) as a box and RigidBodyControl and try moving it towards the player it would work well on flat but f**k up on slopes and stuff. So I want it to be able to move around towards player without flipping over itself.

I don't know how CharacterControl does it (makes the player not flip over and go up slopes and stuff).
PS: I tried using CharacterControl for animals but there can only be one CharacterControl at a time.
@normen said:
Are you making fun of us?

No I'm not, I just think you don't really understand my question. Look on the reply I just wrote to @zarch.
@ivandonat said:
No I'm not, I just think you don't really understand my question.

Your question as to why the character doesn't work for you would be answered if you just did the tutorials (no, skimming them for the word "npc" doesn't count). Your conclusion about just one character being possible at a time is also complete nonsense. So you don't understand this, fine, so go and read about it. A character in a game is neither a character control nor a model nor a spatial, its information about a location, actions etc. etc. which are then projected on whatever visual you chose. So there is no answer to your first question or it would be "it depends". The wiki has lots of documentation and example code and links to even more examples. If you don't know what to do then the issue is simply that you don't know what you can do and thus don't come up with an idea. Its not like this is little big planet or some FPS mod, the engine is there to do things that you want to do and not to tell you how to do things. If you want that, get some moddable FPS.
@normen said:
Your question as to why the character doesn't work for you would be answered if you just did the tutorials (no, skimming them for the word "npc" doesn't count). Your conclusion about just one character being possible at a time is also complete nonsense. So you don't understand this, fine, so go and read about it. A character in a game is neither a character control nor a model nor a spatial, its information about a location, actions etc. etc. which are then projected on whatever visual you chose. So there is no answer to your first question or it would be "it depends". The wiki has lots of documentation and example code and links to even more examples. If you don't know what to do then the issue is simply that you don't know what you can do and thus don't come up with an idea. Its not like this is little big planet or some FPS mod, the engine is there to do things that you want to do and not to tell you how to do things. If you want that, get some moddable FPS.

You just said to me before that there is only 1 character exclusive

EDIT: CharacterControl exclusive*
@ivandonat said:
You just said to me before that there is only 1 character exclusive

EDIT: CharacterControl exclusive*

No, I didn't
@normen said:
No, user error, read the manual and do the tutorials, theres one on the character exclusively even.

This.

OH; I Thought you said there can only be 1 CharacterControl, nevermind I'm stupid