Jump to content

  • Log In with Google      Sign In   
  • Create Account

Simple character movement in 3d environment


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Silverlan   Members   -  Reputation: 350

Like
0Likes
Like

Posted 25 November 2013 - 08:31 AM

I'm currently trying to implement some basic character movement for a first person game I'm working on, but I've run into some problems.

 

Let's say there's an outside force that applies a velocity of Vector(500,60,0) to my character. For the sake of this example, let's say that force is constant and doesn't decrease.

Now the player starts moving in a random direction, like Vector(0.827846,0.560955,0).

How can I determine how much more the player can accelerate in that direction without going over the bounds of his max movement speed?

I basically need to retrieve the speed of the outside force in the player's movement direction.

 

Any suggestions?

How's this usually handled in other games?



Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 13915

Like
1Likes
Like

Posted 25 November 2013 - 09:05 AM

Why do you need to determine that? I would think you just compute the sum of all forces on the character and integrate. If you want to impose a maximum movement speed, I can think of several ways to do it:

 1) limit the velocity vector's magnitude explicitly,

 2) introduce drag,

 3) make the force applied by the character's locomotion system depend on how fast he's going,

 4) Lorenz contraction (this is mostly a joke).



#3 mawigator   Members   -  Reputation: 404

Like
1Likes
Like

Posted 25 November 2013 - 03:35 PM

 

I basically need to retrieve the speed of the outside force in the player's movement direction.

 

 

Normalize vector of player direction, and make dot product of normalized direction and the velocity vector arising from outside force.



#4 tonemgub   Members   -  Reputation: 1156

Like
0Likes
Like

Posted 26 November 2013 - 07:43 AM

Doesn't "player's max movement speed" actually refer to the speed/velocity that is generated by the player's own, internal forces? I've never heard of limiting external forces. You'll basically end up limitng things like gravity - I don't think that's your intent.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS