Jump to content
  • Advertisement
Sign in to follow this  
Grattier

[MDX] Why my intersect won't work...

This topic is 4493 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to intersect a mesh... everything is ok but now.. I have to move it and test it again.. here is the prob: I lock my vertex... change my x,y,z (add some values) and unlock it.. It work! ... my mesh move and my intersect work on my moved object! Nice! Now.. I have to do a YawPitchRoll on the mesh.. so what I do is:
Dim pn As Direct3D.CustomVertex.PositionNormal = CType(arr.GetValue(i), CustomVertex.PositionNormal)
pn.X += Me.position.X + (Me.dimension.Width / 2)
pn.Y += Me.position.Y + (Me.dimension.Height / 2) + 80
pn.Z += Me.position.Z + (Me.dimension.Depth / 2)
pn.Position.TransformCoordinate(Rotate(15, 15, 15))
my transformCoordinate work because if I draw it.. Everything show OK... but if i Test the Intersection.... my transformCoordiante don't affect nothing

Share this post


Link to post
Share on other sites
Advertisement
Ok.. it's strange... i found a way to do it:

Dim tempV3 As Vector3 = pn.Position
tempV3 .TransformCoordinate(Rotate(15, 15, 15))
pn.Position = tempV3

and it work.. Why I can't do it dirrecly I dunno but now.. it work :)

a+

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!