- Home /
What variable type is this?
Trying to translate the contact variable in Java to C# can someone help me?
void OnCollisionStay (Collision collision)
{
for (var contact : ContactPoint in collision.contacts)
Answer by tanoshimi · Sep 27, 2013 at 05:15 PM
In c#, it's a ContactPoint, just as in JavaScript:
foreach (ContactPoint contact in collision.contacts)...
All the types are the same in both languages, except for the primitive types. Also, I feel I should add that Java is not the same thing as Javascript. Unity does not support coding in Java, at least not without out substantial extra work.
Your answer
![](https://koobas.hobune.stream/wayback/20220613114920im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Wheel Colliders not registering Collision on OnCollisionStay 1 Answer
Collision.impulse = 0 in OnCollisionStay Kinematic Static collision pair after Update 0 Answers
What is an effective way of colliding but passing through another surface? 2 Answers
Player getting stuck in corners 0 Answers
Moving a player on a rigidbody platform that can collide 2 Answers