![]() ![]() ![]() However, don't forget that you still have to tick the "Convex" parameter at the Rigidbody component, too.Īpart from that, did you attach the Rigidbody component to a GameObject node in the hierarchy above (=parent) the MeshColliders, or to each individual collider GameObject? You can set the "Force Convex" parameter in the AlphaMeshCollider component so that the mesh is guaranteed to be convex. Two things come to my mind that might lead to this problem:ġ) Does the Rigidbody have the "kinematic" flag ticked? This should be unticked, remember the statement "Kinematic Rigidbodies are not affected by forces, gravity or collisions." on the unity physics manual page.Ģ) Is any one of the two objects really convex? Only declaring them as convex when the objects are in fact concave could lead to unexpected behaviour (at least if the collision mechanics are implemented the way that I think they are). Maybe we will put runtime-mesh-colliders on our roadmap for future updates, so that users won't need to write any additional code to achieve this.Ĭlick to expand.Thank you very much for purchasing our tool! If it does, feel free to ask if you need any help on the issue. The Unity engine itself could come with some performance-limitations in this case, so we suggest that you try out changing MeshColliders at runtime first to see if this fits your performance requirements. However, we have not yet tried modifying MeshColliders at runtime, but you could have a look at these forum posts here. Note however that these calculations take some time, so it depends on your requirements. If you really need to adapt to dynamic changes at runtime and offline pre-processing is not an option, then you could still utilise 2D ColliderGen functionality, but with a bit more coding involved: The plugin provides methods such as BinaryAlphaThresholdImageFromTexture(), TriangleFenceOutlineFromBinaryImage(), etc, that could be used for this purpose. What exactly would you like to do at runtime? If the MeshColliders could be calculated in offline-mode in the editor, and you only need to enable and disable some collider-GameObjects at runtime, it would be rather easy (tried and tested this myself). Supports all versions of Unity – no requirement for Unity Pro.Ĭlick to expand.Basically yes - you could use 2D ColliderGen for runtime-purposes, but (for now) not as comfortable as using it in offline pre-processing mode, depending on what you want to acomplish.Even works with SmoothMoves BoneAnimation characters.Colliders can be forced convex for movable objects.Adds no additional performance cost at runtime – colliders are created entirely within the editor.Simple parameters, optimal results – vertex count, alpha threshold and more. ![]() Visit the Official Webpage with FAQ Section SmoothMoves, 2D Toolkit and Orthello (Free, Elements and Pro) - Scroll down for tutorial videos.Ĭan be used with other 2D packages or completely without one, too - see this page for more info. The colliders are created within the Unit圓D editor in order to have no performance impact at runtime. The 2D ColliderGen framework allows you to automatically generate precise polygon colliders for your game objects from a sprite image’s alpha-channel. Create Precise Polygon Colliders for Entire Scenes at the Click of a Button - Instant 2D Physics I want my player to be able to walk inside the Tile instead of just walking on top of it like it was a platform.2D ColliderGen is now available on the Asset Store for 30$ When I Start the simulation, the player "Spawns" on top of the Tilemap instead of inside of it. I have added RigidBody 2D (Static Body Type) and Tilemap Collider 2D components for the Tilemap. This makes it quite difficult to create a map out of tiles since I cannot line them up properly.įrom the Sprite Editor, I have learnt that each tile is 256x256:Ĭould someone give me some advice on what would be the correct or most efficient method to ensure that the Grid matches the Tile size?Ģ. When trying to create a Tilemap, I have noticed that when placing Tiles on my Screen are much bigger than the Grid: That contains a basic Character and some Tiles. I am using Free Asset that I have found in Unity Asset store: I am currently learning about Tiles and how to move my "Player". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |