Currently, I am trying to make a fighting game. And there are some skills. Some skills may be walking front a few steps and grab a player (the character will automatically change the direction while moving). Here is the question, what is the best method to let the player move the front a few step? I should use linearvelocity to let player move front or use other method?
This depends on specifcally what you mean by “walking front”. If you want the player to actually walk, you can use humanoid:moveTo. If you want more of a “float towards” or “dash towards” effect, then you could use linearVelocity. If you want it to be more of a skill that has a fixed area (instead of the player being able to control where they’re going), you could raycast for who you’re grabbing and then simply playing an animation.
I would assume you want the second option, which means you should use linearvelocity.
for example, I use the strongest battle ground to do an example, as you can see from the video. The character move to the front first and have a attack. The part I want to ask is “move to the front first”
Here is the video
(maybe the link cannot work, I changed, should work now)
I can’t really tell if the character is still in your control after using the skill (as in, when the character runs forward, can you turn around or go to the side, or are you supposed to lock on to the character?)
Also no worries about the link, I figured out how to make it work
If you want the character to be controllable just give it a new animation. If you want it to be controllable but non-stop running (as in, it cant stop running), use linear velocity. If you want it to lock on to the enemy, use an animation.
when the character runs forward, you are able the change the direction when the player move the camera
Ok, but is the character supposed to be able to stop running when you don’t make it run, or is it supposed to be running forward without the ability to stop? If the latter, you want to use something like linearvelocity
but if I use linear velocity, will it cannot change the direction when moving forward?
after using the skill the character keep running until the skill is finished
I’m not sure if linear velocity allows you to change directions when moving forward, but there is most definitely a way to make it allow you to do that. Perhaps write out a simpler version of what you want to test if it works, and if it doesn’t, I’ll see if I can find you another solution.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.