A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by melven » Tue Jan 27, 2009 6:36 pm
I'm using the new newton 2.0 beta with an adopted version of OgreNewt and want to use convexcasts for camera-movement.
With simple covex shapes it works very nice, but treecollision-bodies seem to be ignored completely by the convexcast.
Here are some pictures:
the blue lines visualize the convexcast,
black lines are bodies that are ignored in the prefilter function (the black ball is the camera)
red lines are bodies, that are "hit" by the ray
This is, how it should look like:
Here is the same example with a treecollision (white shape)
Additionally the camera cannot move through the treecollision like through other bodies (I remove all ContactJoints)
-
melven
-
- Posts: 14
- Joined: Wed Jun 25, 2008 7:21 am
by Julio Jerez » Tue Jan 27, 2009 7:10 pm
are you castion teh blowe ball?
the trajectory do not shwo the land scape mesh in the path of teh ball.
Or I am not undertanding the image.
note:
you can not use a tree collision as casting shape?
also make sure you have teh laters
viewtopic.php?f=9&t=4922
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by melven » Tue Jan 27, 2009 7:21 pm
I'm casting the collision of the camera, its a simple ellipse, the two blue balls show the collision used in the convexcast at the beginning and the end of the cast.
The blue box around the two balls shows an AABB of the cast...
you can ignore the fence with the blue lines in the second picture.
-
melven
-
- Posts: 14
- Joined: Wed Jun 25, 2008 7:21 am
by Julio Jerez » Tue Jan 27, 2009 7:50 pm
you casting a sphere horizntally, I do not see anything visually in the path of sphere.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by melven » Tue Jan 27, 2009 8:08 pm
the white person is a rigid body, I cannot move with the camera through it (though I'm removing all contacts in the contacts-callback for the camera).
It's the same with all other bodies I created with the "NewtonTreeCollision..."-functions
I've updated to the latest linux32-build...
-
melven
-
- Posts: 14
- Joined: Wed Jun 25, 2008 7:21 am
by Julio Jerez » Tue Jan 27, 2009 8:19 pm
I see, you know I just have a bug report that spheres do not cast.
It is amasing I miss that.
Sheres and capsules are of the primitives I special case in the engine,
I do not like to do that but in the case of spheres and capsules the payoff if just to big to pass off. by the I have that problems that each feature had to be specially coded.
I will check it tonight.
In the mean time try using other shape for casting,
I definitly will chek that bug because spheres are a eassy and fast way for castiong, an we can not have a bug like that.
bascially is a ray cheap ray cast.
Glad yuo are usin teh new features.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by melven » Tue Jan 27, 2009 8:42 pm
I've tried a box and that works nice. I didn't think of trying different shapes before though.
Whats about moving a sphere through a TreeCollision ( here I didn't try the box ) ?
-
melven
-
- Posts: 14
- Joined: Wed Jun 25, 2008 7:21 am
by Julio Jerez » Wed Jan 28, 2009 12:24 am
Ok bug fixed, you will get it wit next beta update this weekend.
I am working on a feature.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Thu Jan 29, 2009 1:25 am
Ok I put the window update with the Sphere convex cast fixed, and few minor uptimization.
are you using Linux?
for the minux you will have to wait until the weekend when I put on the globes and box a few round with Linux.
-
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 15 guests