Announcement

Collapse
No announcement yet.

Toss a ring physics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Toss a ring physics

    Hi all,

    I am new to the engine... I want to make a ring toss game.

    The goal for me now is to spawn a ring when player click a button. Then toss the ring out after releasing the button.


    I have few questions here:

    1) How do I toss the ring like a project tile? I used add impulse function, it makes the ring fly straight out and never fall.

    2) How do I add spin while to ring's projectile? Just like frisbee.

    3) When I spawn the ring, I want the ring stick to player's camera but not fall down. Should I enable the physics simulation right before I launch the ring or after?

    Thanks for the help!! I really appreciate this!

    #2
    Anyone can give me some hints? Please....

    Comment


      #3
      Do you have gravity enabled in your project settings? Should be the default -980 value. Are you sure the ring had 'simulate physics' set to true? did you try using an impulse with less strength?

      Adding spin should be as simple as doing "set angular velocity" after the impulse has been applied.

      Enable the physics right before you launch the ring.
      Ryan Brucks
      Principal Technical Artist, Epic Games

      Comment


        #4
        Thanks for the reply!

        I assuming the logic now is: Spawn a ring actor > Add impulse after clicking the button > Set 'simulate physics' to true right after > set angular velocity.
        Am I correct?

        Also, my ring blueprint has the ring mesh as a component. When it is doing its physics, do other components in the blueprint move with it, such as trigger?

        Thanks!

        Comment


          #5
          Hi Ryan,

          I followed the instruction you gave me. But the ring still fly straight without falling down.

          When I just put the ring in the level with simulate physics checked, it falls down fine. But enable "simulate physics" in blueprint then Add impulse just make the ring fly straight.

          I attached my setting below. Please help me with this.
          Click image for larger version

Name:	toss.PNG
Views:	1
Size:	85.4 KB
ID:	1119173
          Click image for larger version

Name:	ring.PNG
Views:	1
Size:	394.3 KB
ID:	1119174

          Comment


            #6
            You could try redoing it as a projectile but honestly I am not sure why it isn't falling. Im my experience it should 'just work'. Ie, if you apply a really tiny velocity it should nudge it to wake up and it should just fall. Are you saying it just coasts perfectly level at a slow speed when you do that?

            Have you tried in a new blank project? Here is how I did the arrows for the bow and arrow example as a projectile. You could download it by going to the events forum and finding the bow and arrow thread.

            Click image for larger version

Name:	arrow.JPG
Views:	1
Size:	62.8 KB
ID:	1119191
            Ryan Brucks
            Principal Technical Artist, Epic Games

            Comment


              #7
              I have tried putting different values into the impulse field of "Add Impulse". It just makes it fly faster and slower.

              It does fall down when it touches objects. However, the fall might be not be noticeable enough for me to tell. How can I make it feel like toss a ring (fly up a bit then fall down) motion? Or drop faster?

              Maybe there is just another value I need to tweak?

              Comment

              Working...
              X