A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by misho » Fri Mar 10, 2017 4:13 pm
If you kids are ready
, I can supply you all sorts of terrain configurations for your testing. For example, here is an off-road terrain for testing:
And this is super easy to do, with an elevation map and displace modifier:
Size of the grid, and height of the hills are just a simple parameter. Plus a nice tiling dirt texture. Let me know
-
misho
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
by Julio Jerez » Fri Mar 10, 2017 5:34 pm
oooooh, that would be so awesome, for the more advance demos and for off roads vehicles.
actually for all kind of demos
Tanks!!!!
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by misho » Fri Mar 10, 2017 9:37 pm
-
misho
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
by Julio Jerez » Fri Mar 10, 2017 9:50 pm
I put the first one, I have to save yet, but I see that the second is so much better.
only one small problem a 100 x 100 meter is too small for car.
can you make twice as big in each direction? I try scaling is by the it loses all of the detail.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by misho » Fri Mar 10, 2017 10:20 pm
No problem... do you need bin or ASCII?
-
misho
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
by misho » Fri Mar 10, 2017 10:40 pm
Done. 200m a side. Links are the same.
-
misho
-
- Posts: 673
- Joined: Tue May 04, 2010 10:13 am
by Julio Jerez » Mon Mar 13, 2017 3:21 pm
Sweenie I am trying to make function InitRigidBody abstract so that we can make it a base class for the vehicle and other special features, whoever I am getting a bunch of errors that I can not figure out since I can not step in debug mode. I commited with the code commented out. maybe you can see what I am doing wrong.
Is bad that an abstract function cannot has a function body. but when I made and interface then it malfunctions. I get this error message, but I do not know what it means
The class named 'NewtonBody' is abstract. The script class can't be abstract!
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Mon Mar 13, 2017 4:16 pm
oh never mind I replaced public abstract with public virtual and now it works as I expect
I am no sure why using abstract failed but I am glad it did because I prefer using virtual any way.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Sweenie » Tue Mar 14, 2017 1:11 am
Good you sorted it out.
Sorry for being absent the last few days but im down with the flu.
-
Sweenie
-
- Posts: 498
- Joined: Mon Jan 24, 2005 7:59 am
- Location: Sweden
by Julio Jerez » Wed Mar 15, 2017 9:20 am
I found this tutorial that allow to make editor short cuts for sliders
https://unity3d.com/learn/tutorials/top ... list=17114so I though maybe there are more short cuts like that, but I can not find in the doc a list of these bracketed stuff.
one thing that bothers me is the way Unity baby sys the user base with these blend tutorials, that's good for a beginner who knows nothing, but then soon become like washing a re run of a sitcom.
The Place I find about these bracket statement is when you use them or when I type in google and some want ask about.
do you know where to find information about the list of those editor commands?
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Wed Mar 15, 2017 10:35 am
Ok I am moving on with the vehicle integration, and I am having a new problem that I do no know what why happens, I get a silken crash with no clue
basically I made the wheel a sub class of rigid body and the wheel collider a subclass of the chamfered cylinder.
at this point the wheel should behave like a regular rigid body because is not attached to the vehicle,
but when I run the demo it simply pass through the floor.
to debug it I made a copy, but now I run into a second problem when I try
when I run delete the wheel component unity simple crash when no trace stack and no information.
the weird part is that it only crashes if I try to remove the component from the copy, but not from the original model.
If committed the test, maybe you can get a crash in the unity debugger to see what is wrong.
I will try to find out why eh wheel do no collide at all.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Wed Mar 15, 2017 11:13 am
Ok I got the collision missing bug fixed, but I can no determine the crash in unity.
if you sync you will see a tire separate form the vehicle, what I want to do was to delete the otherires and make a copy of one that was already constructed,
on doing that I came across that problem, if I try to delete component form a cloned GameObject Unity crash uncondionally. NO sure why is that or what I am doing wrong.
some more info, if I run unity as outside of visual studio, I do get error message
NullReferenceException: Object reference not set to an instance of an object
NewtonCollider.OnDrawGizmosSelected ()
UnityEditor.DockArea:OnGUI()
but the inability to debug or set break point make is hard to figure out what I am doing wrong.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Wed Mar 15, 2017 11:33 am
It seem the bug is in here
- Code: Select all
public virtual void OnDrawGizmosSelected()
...
...
Transform bodyTransform = transform;
while ((bodyTransform != null) && (bodyTransform.gameObject.GetComponent<NewtonBody>() == null))
{
bodyTransform = bodyTransform.parent;
}
Debug.Log("xxxx ");
it seems when I delete body, then Transform can be null and next line try to read data form a null reference. at least it seem that the issue. I'll try to fix it later.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Wed Mar 15, 2017 11:42 am
all right it is fixed now, I will continue elaborating more on the vehicle.
In the newton side I need to add the option to make a tire which already has body and collision.
I only have interface to create tires from parameters, but the is not reason to make like that,
make the object in the editor is more intuitive so I will have to add some gymnastic to the interface.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 7 guests