how to make vehicle AI run down Player ?
I'm working on my 1st mobile game and want to achieve an vehicle AI (a lawn-mower to be specific) which runs down the player. The problem is I can't get a proper AI setup, the vehicle has simulate physics on by default. So when the vehicle hits the player, both the player and the vehicle get knocked around. My Setup for characters is that when they are hit with enough velocity, they enter ragdoll. The current vehicle setup looks like the car is made up of paper and gets knocked around when player hits it !! plz help !!
I have referred Peter Newton's Car AI for vehicle movement but the major problem is that physics of vehicle isn't fitting well with my current physics based game situations.
Plz help guys !
asked Oct 16 '16 at 10:00 AM in Blueprint Scripting
I am not very familiar with Behaviour Tree's yet but if I am hearing you right the following problem is happening:
The lawn mower moves toward the player and I am assuming knocks the player over and then stops.
And what you want is for it to run him over and continue moving?
If this is the case you might want to change the collision settings to overlap all dynamic. This will make the lawn mower trigger the "death" event when he comes in contact with the capsule you are referring to but will not stop the lawn mower from moving.
If you wanted the lawn mower to keep moving past the player to sort of "run the player down" you could then switch the move to destination to just past the character using some vector math if you had to, although I would guess that it might just do that automatically as is gradually slows down instead of coming to an instant full stop.
Try the collision settings first and let me know if that helps.
answered Oct 17 '16 at 01:33 AM
So if I am hearing you right, you want the player to enter Ragdoll when he is hit by the lawn mower, but you don't want the lawn mower to bounce off the player or be tossed around?
There are a couple options here.
First, you could select the Lawn Mower object and look at the details panel. Under physics you should see "Simulate Physics" and "Mass" Parameters. If you check both these boxes, and make the mass significantly higher than the player, he should not bounce off the player and will be "heavier" in the physics logic. This may help.
Second, at the bottom of the physics section in the details panel is a "Constraints" option, with a drop down arrow. Clicking this arrow will reveal 6 check boxes. Constraining the Lawn mower's rotation along the X Y and Z axes could also possibly help. Also if you didn't want the lawn mower to ever lift off the ground, constraining the Z axis would prevent this from happening.
The last option I can think of is a little more advanced and involves making the two objects ignore collision with each other but create some sort of overlap trigger event that would launch the character when he is overlapping the static mesh of the Lawn Mower. Here you would want to set the collision on the Lawn mower to overlap all dynamic or something, and then use the "launch player" node on "On Component Begin Overlap" or "On Component Hit".
Hope this helps.
answered Oct 16 '16 at 12:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here