Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Yeti des Bois

Member Since 05 Sep 2013
Offline Last Active Dec 13 2013 03:21 PM

Posts I've Made

In Topic: Ribbon/billboard trails

07 September 2013 - 12:50 AM

OK thank you I managed it, altough I still don't understand why switcoder added "a direction constant indicating left or right side of the strip"


In Topic: Ribbon/billboard trails

05 September 2013 - 04:36 PM

Hello, I'm trying to reproduce your method for billboarding trails, but I've some difficulties... You mentionned "Direction constants" :

 


plus a direction constant indicating left or right side of the strip

 

Assuming direction of the segment is UnitZ, and the normal of the segment UnitY : direction constants are UnitX for thie left side and -UnitX for the right part ? I mean, these two vectors point outside the segment. But the result is not correct.

 

Here is how I implemented your description :

 


but I am now crossing the segment axis with the direction from the segment to the camera
Vector3 dir = Vector3.Normalize(cameraPosition - Position);
Vector3 dir2 = Vector3.Normalize(Vector3.Cross(dir, Direction)); //Direction = UnitZ


I then multiply by the side constant to move either left or right, and add it to the position
Vector3 final = Position + dir2 * OutSideDir; //UnitX

and then multiply by ViewProj matrix

 

Thank you for your help


PARTNERS