Programming 2D Games

The official forum for "Programming 2D Games" the book by: Charles Kelly

It is currently Sat Jul 21, 2018 9:25 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Sep 17, 2017 1:27 pm 
Offline

Joined: Sun Sep 17, 2017 1:13 pm
Posts: 2
Hi

I wonder how you do the vector math for finding the collision vector V1' at page 169 in your book?
At the bottom of the page it ends up with the formula:

V1' = V1 + massRatio * rV

Do one have to use vector math trigonometry to find V1' or is there another solution / function etc?

Best regards
Sverre Bjering
Haugesund Norway


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 17, 2017 10:00 pm 
Offline
Site Admin
User avatar

Joined: Sat Jan 28, 2012 4:36 pm
Posts: 546
Vector math is the best way to calculate it, mostly because DirectX includes a vector math library.

_________________
Professor Kelly


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 18, 2017 12:20 pm 
Offline

Joined: Sun Sep 17, 2017 1:13 pm
Posts: 2
profkelly wrote:
Vector math is the best way to calculate it, mostly because DirectX includes a vector math library.

Thank you very much!

Best regards
Sverre Bjering
Haugesund Norway


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group