- Home /
creating an asteroid-like game in 3d
I am attempting to create an asteroid like game in 3D with a slight twist. Frankly it is not commercially viable but I like the challenge. Like the original game, there is a wrap-like effect that is emulated by a gigantic box collider(as a trigger). Once the trigger is hit, a raycast is directed towards the origin of the box. The layer mask is the bounding box. It then repositions the object towards the hit position.
This working nicely for single objects. However there are clusters of objects, the math i cannot figure out how to implement. These are clusters of balloons, where each has the same parent object BalloonCluster. They are attached via a spring collider to the same object: a banana.
If one of the object hits the world bounds, the whole cluster starts to act wonky. I understand why though and that is because of the attached spring collider.How can I implement a viable solution to this problem?
What method are you using to reposition the clusters? Setting transform.position? Or rigidbody.position? Or rigidbody.$$anonymous$$ovePosition? Sounds like you simply want to "teleport" the clusters, temporarily ignoring physics?
The cluster is an empty game object that contains balloons, each of which has its own rigid body. The objects are repositioned using transform.position.
I think I might have been looking at this all wrong. I wanted to use something fancy while the problem could have been solved by adding a collider to the parent clustering object.