how to use entitybox ?

Blitz3D Forums/Blitz3D Beginners Area/how to use entitybox ?

Atomic Duck(Posted 2004) [#1]
Let's say you want to add an entitybox to a mesh of car...

I know you can use Meshdepth,Meshheight and Meshwidth to calculate the size of the mesh, but where do you start to calculate the entitybox?

Example:

the car mesh is 11,17,5 (width/height/depth)

Now, do I start from the center (5.5/8.5/2.5) or do I start
from 0/0/0 ?

And, if I use EntityBox, do I still have to use EntityRadius
of will EntityBox suffice?

Thanks


Rob Farley(Posted 2004) [#2]
I don't mean to sound rude here, but have you even typed in these commands yet to see what happens. So many people come here asking questions before they've had a play at all.

It would take you 5 minutes of playing around with blitz to answer your own questions.

Why not give that a go?

Sorry for being blunt, it just annoys me.


WolRon(Posted 2004) [#3]
If you had read the Collisions command you would have seen this:
In the case of a collision detection method of 1 being selected (ellipsoid-to-ellipsoid), then the destination entities concerned will need to have an EntityRadius assigned to them too. In the case of method being 2 being selected (ellipsoid-to-box), then the destination entities will need to have an EntityBox assigned to them. Method No.2 (ellipsoid-to-polygon) requires nothing to be assigned to the destination entities.
So, the answer to that question is if you use EntityBox, you do not need to assign an EntityRadius (unless you want to).


puki(Posted 2004) [#4]
Welcome back "Atomic Duck" - you haven't been around for a few months.

Keep at it "Atomic Duck", no harm in asking. I think "Rob Farley" and "Wolron" have been a little bit harsh (especially "Rob Farley" - no dessert for him tonight)

After all, it is 'Beginners Area'.


RiverRatt(Posted 2004) [#5]
Here is a sample I had help with a while back and here is
a pretty good explanation I got.
http://www.blitzbasic.com/codearcs/codearcs.php?code=944
;1. Since you scaled the cube by 6 (the cube was originally from -1 To 1
;on it's Local axis) the -6's are the start position of the collision
;box (since 0,0,0 is the exact centre of the cube, in it's Local axis of
; course)...

;Not sure If I have explained that clearly enough - but essentially the
;midpoint of the cube is 0,0,0 - using EntityBox you have To specify the
; start point of the collision box (ie. one corner) And tell it the size.
; In this Case the New scaled up corner is now -6,-6,-6 And the New size
;is 12,12,12. It's much easier To grasp this If you draw it on paper - in
;effect it means that your collision box can be anywhere relative To
;your actual geometry.

;2. The collision normal will always be of length 1. Now, since my
; was moving by 0.2 units Each frame I just scaled down this
;length To make an arbitrary but reasonable effect of pushing the boxes
;at half the speed of the player - ie. 1/10 = 0.1 - this gives the effect
;that the boxes have friction against the Floor.

;In your instance you are moving the character by 0.25 units Each
;frame - therefore If you divide the collision normal values by 4 you
; will be moving the boxes at the exact speed of the player (1/4 = 0.25).


WolRon(Posted 2004) [#6]
I think "Rob Farley" and "Wolron" have been a little bit harsh
Although you may think my response was being harsh, it wasn't meant to be. I answered his question.


Atomic Duck(Posted 2004) [#7]
RiverRatt, WolRon

Thank you very much for your explanation.
The problem is pretty much solved now. :)