Sign in to follow this  

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

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
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 :)


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this