Is it possible to find out the distance from the center to the farthest away left, right, bottom and top point of a World3DModel? So in my sketch I mean the red, green, blue and yellow routes (the black rectangle is a model)?
World3DModel width and height
-
- English / German
- Galveston01
- Thread is marked as Resolved.
-
-
Not sure to understand: presumably 'you' made the model, so 'you' should know, don't 'you'?
-
No, I need those routes for implementing collision in my SimpleCars Plugin. The model isn‘t made by me and it is customizable by the users. Of course, I can force every model to pass those routes in their Config (*.car) file, but it would be nicer to get it progrmmatically
Alternatively it would allready help to simply get the models width and height. -
No, I need those routes for implementing collision in my SimpleCars Plugin. The model isn‘t made by me and it is customizable by the users. Of course, I can force every model to pass those routes in their Config (*.car) file, but it would be nicer to get it progrmmatically
Alternatively it would allready help to simply get the models width and height.I see. I don't think there is any *supported* way to do this now. I would investigate what the CollisionShape.getData() method (in either overload) returns: it is marked as "used internally", undocumented and then subject to change, but, who knows...
-
-
Hmm... yeah actually it would be quite useful in certain situations to have access to the bounding information of a model. We'll add some methods to calculate the bounding information, probably this will be available with the next update
-
Thanks
Until then, I'll do it so that the size has to be put in the config
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!