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"

Calculate two Snooker ball collide

Hi Guys. I currently want to build a snooker game. I am not using the unreal physic simulate system for my snookerball. I am updating the ball location at the actor tick function so I wanted to know how to calculate the angle of the snooker ball when ball A hit the ball B. Here is how i want them to move

alt text

I could calculate the angle of reflect of ball A but I don know how to calculate the angle of reflect of ball B. I calculate the reflection of Ball A using this formula from a tutorial:

FVector ReflectedVelocity =-2 x FVector::DotProduct(MyballVelocity, HitNormal) * HitNormal + MyballVelocity;

The MyballVelocity is a FVector type which store my ball CurrentVelocity. The HitNormal is provided by the EventHit blueprint function.

I Update my ball location on the Event Tick by doing this

SetActorLocation(GetActorLocation() + MyballVelocity * DeltaTime, true);

My question is how to calculate the Ball B reflected velocity in Fvector.

Any help will be appreciated.

Product Version: UE 4.18
snooker-ball.png (6.9 kB)
more ▼

asked Mar 18 '18 at 08:12 AM in Blueprint Scripting

avatar image

1 2 3

avatar image waterstoom Mar 22 '18 at 10:42 AM

anyone can hlp me? T_T

avatar image waterstoom Mar 29 '18 at 02:37 PM

bump need hlp

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

0 answers: sort voted first
Be the first one to answer this question
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