terrain collsion updating when morphed

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Darkelfv
Posts: 9
Joined: Wed Sep 13, 2006 3:26 am

terrain collsion updating when morphed

Post by Darkelfv »

This maybe a simple fix but im trying to scale my terrain in realtime, which works fine terrain.scale = scale (in the event handler)

The problem is the collsion map for the terrain

Code: Select all

 Dim selector As ITriangleSelector = device.SceneManager.CreateTerrainTriangleSelector(terrain, 0)
            anim = device.SceneManager.CreateCollisionResponseAnimator(selector, camera, New Vector3D(60, 100, 60), New Vector3D(0, -1, 0), New Vector3D(0, 50, 0), 0.0005F)
            camera.AddAnimator(anim)
I can't find a way to delete the current one, or modify it or have it recalculate with out adding another one. or Delete then add new.

Looking through the api docs I see a terrain.DynamicSelectorUpdate However this seems to only be for mipmap. Does not seem to work when scale is changed

Is there a way to make a call for this, delete it from the scene and add it again, any solution would work but just keep adding a new one causes problems (scale down for example and memory usage)

What im planing on doing is using 9 terrain nodes to dynamicly shuffle and load new data according to location (preload the next zone with out having alot of nodes)
Also though I plan to have scaling (giant and small potions) I want to scale the land and not the player

So far it looks like im going to have to get involved in the source and really add some features to the c++ (working with vb.net now) I want to avoid this if possible and asking here first.
Darkelfv
Posts: 9
Joined: Wed Sep 13, 2006 3:26 am

Post by Darkelfv »

There is a function in the source , i think its accessible in c++ setworld, in the source it drops the world if there already is one then creates a new one, This is exactly what would help me refresh the collision map. Its not implemented in .net

I have been trying to compile the .net with the change , I have both projects in vc++ express 2005, however the .net gives me about 54 linker errors related to the irrlicht.lib i have created with the source.

I am no lib expert and I do not know what im doing wrong. I think im missing a simple step needed to get .net to compile correctly.

Anyone got this working made there own .net.dll from the source can anyone help me get this thing to work?
1. How do i compile irrlicht into a lib (lib project, dll project with the small lib)
2. how is this properly linked to the .net project and compiled with out a gazillion linker errors that all point to irrlicht.lib

thanks tons guys. Im close to getting htis work just missing something.
Darkelfv
Posts: 9
Joined: Wed Sep 13, 2006 3:26 am

Post by Darkelfv »

Got the .net.dll to compile in express

Pm me if anyone has questions on how to get both source's to work in express, took me a while to get it all working, Maybe I will make a tutorial.


Working on changing and brining over some features for my collision reset when terrain is morphed.
Post Reply