hi, im trying to create a plane from a model (the Game's level) in order to check it against the camera's bounding sphere, does anyone know of a good tutorial, or a good way of doing that
any help would be greatly appreciated.
XNA Game Studio Express
hi, im trying to create a plane from a model (the Game's level) in order to check it against the camera's bounding sphere, does anyone know of a good tutorial, or a good way of doing that
any help would be greatly appreciated.
As these forums are going to be turned to read only you should post your questions on the new http://creators.xna.com site. In regards to the log on have a look at my answer here on how to get yourself set up.
Hi if you are just tryinh to cull objects , try this
Check offset is how far away form the camera you what its to be visible.. the rest is sence!!!
'*****************************************************************************
'*MyCamera.IsVisibleCheck2 ****** Very GOOD the best frustrum culling so far nice obe abidreams.com
'*
'******************************************************************************
Public Function IsVisibleCheckGood(ByVal point As Vector3, ByVal checkOffset As Single) As Boolean
Dim vector As Vector4 = Vector4.Transform(New Vector4(point.X, point.Y, point.Z, 1.0!), Me.ShaderViewProjection)
If (vector.Z > (vector.W - 1.0!)) Then
Dim vector2 As New Vector2((vector.X / vector.W), (vector.Y / vector.W))
Dim num As Single = System.Math.Abs(vector.Z)
If (num < 5.0!) Then
Return True
End If
checkOffset = (1.0! + (checkOffset / num))
If (((vector2.X >= -checkOffset) AndAlso (vector2.X <= checkOffset)) AndAlso (vector2.Y >= -checkOffset)) Then
Return (vector2.Y <= checkOffset)
End If
End If
Return False
End Function