What shape is a Pivot
Blitz3D Forums/Blitz3D Beginners Area/What shape is a Pivot
I presume a Pivot has no dimensions other than a xyz positioning, but if I were to scale a pivot proportionaly, what would it look like if you could see it.
I would like to use pivots for collision detection in a ragdoll project im working on and would like to scale the pivots so that they resemble the limbs.
Any help appreciated.
Oh another question while im on a roll,, Why does'nt Blitz's built in collisions work with ragdolls?
...
you can't Scale Pivots... they're just points and will never be visible.
you could parent the pivot to a sphere to make it visible...
to your second question, Blitz has no integrated physics engine, just this small collision system.
But you CAN make ragdoll-like behaviour with blitz collisions (but its much easier, faster and better looking with tokamak or ODE).
I thought you could scale a pivot!!! back to the drawing board.
I should of made myself a bit clearer as regards to pivots, I dont want them to be visible, but just occupy the same space (and size) as the ragdoll limbs for collision detection purposes. I needed to know what shape the were (when scaled)to help me do this.
...They simply dont have a shape, as Raitsun already said.
You can't scale a pivot but you can set its EntityRadius so that it simulates a larger sphere and collides like one.
But no, you won't ever be able to actually see it on the screen although I don't think you wanted to see them?
You can scale a pivot, but they are still an infinitely small point at x,y,z. But this has no bearing on its collision shape.
A small example
Graphics3D 800,600
cam=CreateCamera()
light=CreateLight(2,cam)
PositionEntity cam,0,0,-20
piv=CreatePivot()
PositionEntity piv,-10,0,0
EntityRadius piv,3,3
EntityType piv,1
s=CreateSphere(8,piv)
ScaleEntity s,3,3,3
cube=CreateCube()
EntityType cube,2
Collisions 1,2,2,2
While Not KeyHit(1)
If KeyDown(205) Then MoveEntity piv,1,0,0
If KeyDown(203) Then MoveEntity piv,-1,0,0
UpdateWorld()
RenderWorld()
Text 0,0,"Use left and right keys to move the pivot"
Text 0,12,"collision "+CountCollisions(piv)
Text 0,24,"pivot position "+EntityX(piv,1)+" "+EntityY(piv,1)+" "+EntityZ(piv,1)
Flip
Wend
Thanx for the responses Guys, and thanx for the alternative, ie entityradius.
Entityradius might be just what I need, although the online docs state there may be a bug with scaling on the y axis, anyway I'll give it a go.
If you parent things to a pivot, then scale the pivot, everything will scale along with it, outwards from the pivot point, so scaling a pivot is entirely possible and useful sometimes, just like scaling the camera :o)
I wouldn't get your hopes up about using elliptical collisions. In the few times I've tried, I don't think I've been able to get them to work properly/reliably. Besides, I'm pretty sure they only work on an axis-aligned basis i.e. they can't be rotated.
Yes thats true they don't get rotated so its only OK if you can get away with spherical pivots.