x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Question] 'Damping' Motion in Blueprint? [Soft Gravity-Repulsion For Hover Craft] Video + Screenshot

I'm trying to set a relatively stable (but springy) altitude for my hover-craft so that it remains at a fixed height above the ground. However, I also want this altitude to be fairly 'springy', so you can think of the air between the craft and the nearest collision below it as a suspension spring, but with no upper height limit.

What this means is that if the craft flew off of a cliff, it wouldn't hit the ground directly, but would 'sink' and then slowly return to it's stable altitude, which is only a short distance from the ground. Really, I want to do this 'ground repulsion' in a sphere around the craft, as if the craft is magnetically repulsed by the ground or terrain it's driving into.

I am currently using this network of nodes to give the craft altitude, but it is very jerky in-game, and also has no form of damping so the movement is pretty harsh. I also don't think I want to use a Line Trace to set the altitude, but maybe use a collision sphere or capsule instead? Anybody able to help with this? I also probably want to add some sort of self-righting spring too when the craft is at a low altitude to prevent the craft from rolling all over the place.

[Also in the video, the actor seems to move location when I simulate... any ideas why?]

VIDEO HERE: www.youtube.com/watch?v=7Bflopxmwd0

alt text

Product Version: Not Selected
Tags:
addaltitude.jpg (255.4 kB)
more ▼

asked Mar 11 '14 at 02:53 AM in Blueprint Scripting

avatar image

ue4-archive ♦♦ STAFF
50k 3670 2000 9124

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi James,

You should be able to achieve the result you want by using a Physics Thruster component in your Blueprint.

As for why it moves when you begin play, you are probably somewhere updating the vehicle's position to absolute 0,0,0 (the level origin).

Cheers

more ▼

answered Mar 11 '14 at 02:54 AM

avatar image

ue4-archive ♦♦ STAFF
50k 3670 2000 9124

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:54 AM

Hi Stephen, this almost works but the problem is the thrust ends up rotating the craft unless it's in a perfectly central position, and the velocity is constant.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:54 AM

You will have to create the setup to meet your needs. For instance, if you are having problems stabilizing it, then it sounds like you need multiple thrusters spread out to distribute the mass.

As for the velocity being constant, you have full control over this in the Blueprint. I made a very simple Thruster test with an Actor Blueprint where it turns the thrust off and on based on collision with the ground. You may want to start with the same basic setup, and then build on it to meet your needs.

alt text

Happy developing!

thruster.jpg (161.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question