Forums » Questions and answers »
Using Vector3 in lieu of an IPositionalElement and signature issues
Added by Edward London 7 months ago
would this:
IPositionalElement ipe = ImmlElementFactory.CreateImmlElement() as IPositionalElement;
ipe.Position = new Vector3(x,y,z);
_ParkEngine.RenderEngine.PositionTo2DPoint(ipe);
sufficiently replace this:
_ParkEngine.RenderEngine.PositionTo2DPoint( new Vector3(x,y,z));
It compiled and the .dll built successfully, but when I load my imml that references the .dll I get:
10/7/2011 5:06:00 PM: [Error] (GreenPhosphor) Plugin 'GreenPhosphor' failed to load with error: ZipEntry::ReadHeader(): Bad signature (0x00905A4D) at position 0x00000000
and
10/7/2011 5:06:00 PM: [Error] (NoClipPlugin) Plugin 'NoClipPlugin' failed to load with error: ZipEntry::ReadHeader(): Bad signature (0x7770763C) at position 0x00000000
Any suggestions/ideas?
Thanks,
Ed
Replies (1)
RE: Using Vector3 in lieu of an IPositionalElement and signature issues
-
Added by Edward London 7 months ago
Response from Craig Presti:
"Hi Ed,
You’ll need to package up the plugin to reference it from your IMML. There is a guide showing how this is done with the Creator here http://vastpark.org/projects/vp/wiki/PluginTutorialPart4
I also notice your IMML is referencing an older NoClip plugin, you should remove that reference (as it won’t work) and use the Player’s built in freecam mode (the camera icon in the bottom right) instead.
As to the custom positional elements, we have done similar in the Creator for the props. I’ve attached some classes that we use to do this custom positional work, they are loaded into the RenderEngine like this:
var propController = new PropController(positionalElement, this.ParkEngine);
this.ParkEngine.RenderEngine.Load(propController, new ContentLoadedHandler(delegate(ErrorMessage error, ImmlElement element)
{
propController.Load();
propController.Prop = _ResolveProp(positionalElement);
}));
The PropController is responsible for synchronising position updates between the backing element and the faux element we’re using to draw the lines for the Camera visual. It inherits from VastPark.Imml.Scene.Controls.Primitive
Let me know if you have more questions.
Cheers,
Craig"
(1-1/1)