Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Valik  
#1 Posted : Sunday, November 20, 2011 5:48:19 PM(UTC)
Valik

Joined: 10/2/2011(UTC)
Posts: 36

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
Hi,
i tried to reproduce a controlled sphere, so far i replaced the old not working tasks that the
error messages disappeared. The problem i got now is that the CreateController expresssion does not
create an instance, so the "ctrler" stays null. Thats the code from the sample where the error
occurs. Does anyone know how to use the Controller?
Valik attached the following image(s):
error.jpg (67kb) downloaded 10 time(s).

You cannot view/download attachments. Try to login or register.

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Monday, November 21, 2011 2:43:30 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Which physics framework are you using (2d, 3d, farseer, jitter)?

Also maybe Amer can help. I have not worked with controllers much, but my guess is that they are not implemented in the framework you are using, the code is all there, you should be able to find out what is happening by stepping into the CreateController method.

If you need additional help, please post some source code so we can investigate easier, thanks!
Offline Valik  
#3 Posted : Monday, November 21, 2011 1:08:59 PM(UTC)
Valik

Joined: 10/2/2011(UTC)
Posts: 36

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
I use the Jitter Engine Module. This is the code where i get the error. In v0.9.0 the controlledSphereTest
worked. I had to replace IController3D with IController cause that seems to be the notation in v0.9.1. I
also couldn't find the Physicsmanager which is used in the sample.


spieler = new VisualPhysicsSphere(new Vector(0, 5, 10), 0.5f);

IController strg = Physics.CreateController(spieler.Body, 1f, 1f, 1f);
// Manipulate the sphere with the help of the controller.
Vector direction = new Vector(RandomHelper.RandomFloat(-1000, +1000),
RandomHelper.RandomFloat(-1000, +1000),
RandomHelper.RandomFloat(-1000, +1000));
direction.Normalize();
strg.MovingDirection = direction;
strg.MoveSpeed = RandomHelper.RandomFloat(5, 30);


My hope in the controller was that i can control the sphere, in example to move it with up, down, etc.
Offline Benjamin  
#4 Posted : Tuesday, November 22, 2011 2:44:08 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Originally Posted by: Valik Go to Quoted Post
I use the Jitter Engine Module. This is the code where i get the error. In v0.9.0 the controlledSphereTest
worked. I had to replace IController3D with IController cause that seems to be the notation in v0.9.1. I
also couldn't find the Physicsmanager which is used in the sample.


spieler = new VisualPhysicsSphere(new Vector(0, 5, 10), 0.5f);

IController strg = Physics.CreateController(spieler.Body, 1f, 1f, 1f);
// Manipulate the sphere with the help of the controller.
Vector direction = new Vector(RandomHelper.RandomFloat(-1000, +1000),
RandomHelper.RandomFloat(-1000, +1000),
RandomHelper.RandomFloat(-1000, +1000));
direction.Normalize();
strg.MovingDirection = direction;
strg.MoveSpeed = RandomHelper.RandomFloat(5, 30);


My hope in the controller was that i can control the sphere, in example to move it with up, down, etc.


Hi Valik.

I am not sure what to make of your question. IController has not changed for 4 months and I don't know what Physicsmanager you are searching for (maybe just Physics?)

The Delta.PhysicsEngines.Tests3D.Tutorials.ControlledSphere works fine (but is not very pretty) and I don't see any difference between v0.9.0 and v0.9.1 (maybe I missed something, but from the work tasks nothing happened in Physics except some input refactoring).

You are correct that the IController should work with any IAttachable (like physic bodies), but I could not find any sample or test. The only working controllers are in Delta.Engine.Game (actor and IAttachable stuff).

I have written down a feature request for an IController test and will report back here when it is working and tested. There is also an old document about how this should work, not sure why this task was not fully completed in the past, sorry :(
Offline Valik  
#5 Posted : Tuesday, November 22, 2011 11:24:43 AM(UTC)
Valik

Joined: 10/2/2011(UTC)
Posts: 36

Thanks: 1 times
Was thanked: 2 time(s) in 1 post(s)
Sorry!
I was in the Program.cs of the Test3D and not in the tutorial, after i watched how i did it v0.9.0
i recognized it. The Test is outcommented and semms not to work, but you are right the tutorial does.
Thanks for helping.
Offline Benjamin  
#6 Posted : Tuesday, November 22, 2011 3:33:12 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Yes, we tried to comment out tests we could not fix that easily, but we will work on them to include them again as soon as we do more work in each module.

If you have other questions, feel free to ask :)
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2018, Yet Another Forum.NET
This page was generated in 0.104 seconds.