≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Static collision box
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Yeah, it takes the 3 axis (x,y,z) into account and it requires you to put a value in this format [b](minX,minY,minZ,maxX,maxY,maxZ) [/b] it takes the origin(pivot) of the object into account, so like with the default cubemesh. we know that it has a size of "10" and the pivot is in center of the cube. so in order to create a perfect collision for the default cube we can set the collision box to [b](-5,-5,-5,5,5,5)[/b] because it will calculate from the origin of the object. Let's say for "Y" axis or the height of collision box, it calculates -5 from the origin of the object and creates an edge there, and then it checks +5 from the origin and creates an edge there, making the box with a height of 10 same as our default cube, same goes with the other axis as well. So, it depends on the position of the pivot(origin) of your object and the size of your object for the static collision box. This is how you can calculate and generate static collision boxes. I highly recommend using them when creating 2D games even in 3D games wherever necessary, as they show up in the editor and will keep your scenegraph explorer, neat and clean, and you don't have to add in extra geometry in your game by using dummy collision cubes, that people generally use in their games. It will increase the performance of the game as well. That is why CC's inbuilt terrain is so well optimized, it uses so many trees but there is no lag or performance drop because they all use static collision boxes.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact