Hi Box2D forum,
i have a question about a body with multiple fixtures (all fixtures are polygons). I want to split the body. For this i use a raycastcallback to figure out if the line hits the body.
The raycastcallback works fine. I make a raycast in both directions, so from startpoint to endpoint and from endpoint to startpoint.
The Problem is that the start and endpoint of the raycast not always interest the whole body. So the exitpoint (a property of my class) is always the last interection of the raycast. Because the line is the startpoint fromevent and the endpoint is the last location from .
To save the current states of the body a have a class with properties like sliceExit, sliceEntry etc. The property sliceExit () represent the final exit of the interection. I don't know how i figure out if the line exit the body, because the body has multiple figures.
You can trust me that i tried many things before posting this post. But all failed ):
My next idea would be figure out all vertices from body (not the vertices in the body, only the border of the body). But i have no idea how can i do this.
Sorry for my bad english. I hope everyone understands me. If there any questions or ambiguities about this post, ask me.
Thank you in advanced (:
Greetings Alex
i have a question about a body with multiple fixtures (all fixtures are polygons). I want to split the body. For this i use a raycastcallback to figure out if the line hits the body.
The raycastcallback works fine. I make a raycast in both directions, so from startpoint to endpoint and from endpoint to startpoint.
The Problem is that the start and endpoint of the raycast not always interest the whole body. So the exitpoint (a property of my class) is always the last interection of the raycast. Because the line is the startpoint from
Code: Select all
cctouchbegan Code: Select all
cctouchmovedTo save the current states of the body a have a class with properties like sliceExit, sliceEntry etc. The property sliceExit (
Code: Select all
BOOLYou can trust me that i tried many things before posting this post. But all failed ):
My next idea would be figure out all vertices from body (not the vertices in the body, only the border of the body). But i have no idea how can i do this.
Sorry for my bad english. I hope everyone understands me. If there any questions or ambiguities about this post, ask me.
Thank you in advanced (:
Greetings Alex
