Jump to content

Setting the FPSPLAYER's velocity


Einlander
 Share

Recommended Posts

I'm trying to recreate portals Areial Faith Plate. The faith plate has a constant velocity even with gravity in effect. In Leadwerks on the character controller there is allways drag unless you counteract it. So here is my question, How would I go about creating a launcher that would throw the player in a set arc at a constant velocity?

Link to comment
Share on other sites

There are two ways I would approach a solution.

 

1. If you really want an Arc effect, you would want to use something like AddForce. You could calculate your normal vector, indicating the direction you want your player to go, multiply it by your desired force, to launch your player in the direction of your calculated normal. I had a test-case of this when I was first messing around with bullets.

 

2. If effecting your character controller through the use of physics methods do not work, you can always accomplish this manually, in the same way that you move your character controller. You could calculate your normal vector, like above, only this time, you would apply your desired force over time using some basic trig algorithms to calculate your arc movement. Your player could still move normally however, the arc movement would be added to your character controller movement every frame, until your desired duration of affect is over.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...