<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — Problem with collision result position]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=200&amp;type=atom" />
	<updated>2007-04-17T15:28:45Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=200</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=801#p801" />
			<content type="html"><![CDATA[]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-17T15:28:45Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=801#p801</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=800#p800" />
			<content type="html"><![CDATA[<p>one big difference between v1.2 and v1.3 of the mod is that now when the C++ Irrlicht method return null pointer, the mod now returns a Null BMAX object.&nbsp; before it would return a valid BMAX object, but the handle would be 0 and you would have to check IsValid().&nbsp; got your email will take a look over lunch.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-17T15:16:39Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=800#p800</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=799#p799" />
			<content type="html"><![CDATA[<p>Ah ok, I think my pk3 was corrupt.<br />Now my game is working. Thank You, gman.</p>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-17T15:14:16Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=799#p799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=798#p798" />
			<content type="html"><![CDATA[<p>are you getting a crash or is it not showing?&nbsp; i did not have a problem (at least i think).&nbsp; nothing crashed and there was a cool looking level with grassy hilltops.&nbsp; i removed your project already...&nbsp; could you email me the link again?&nbsp; i will redownload, zip, and send back to you.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-17T13:50:57Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=798#p798</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=796#p796" />
			<content type="html"><![CDATA[<p>I&#039;m still having a problem loading my bsp map. I can load other models as maps.<br />Could there be a problem with how I load the map from a pk3. Did you have any problem loading the map?</p>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-17T12:52:24Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=796#p796</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=795#p795" />
			<content type="html"><![CDATA[<p>found it.&nbsp; while the collision function takes an int ptr to tell if its falling, what you pass in must be a ptr to an actual int variable so it has a place to store the value.&nbsp; two changes are needed.&nbsp; change your Type user global from:<br /></p><div class="codebox"><pre><code>Global Fall:Int Ptr    &#039;User is Falling</code></pre></div><p>to<br /></p><div class="codebox"><pre><code>Global Fall:Int    &#039;User is Falling</code></pre></div><p>and in User.Update() change:<br /></p><div class="codebox"><pre><code>User.Node.setPosition( Col.getCollisionResultPosition( Slc, User.Node.getPosition(), User.Ellipsoid, User.Velocity, User.Triangle, User.Fall, 0.0005, Grv ))</code></pre></div><p>to<br /></p><div class="codebox"><pre><code>User.Node.setPosition( Col.getCollisionResultPosition( Slc, User.Node.getPosition(), User.Ellipsoid, User.Velocity, User.Triangle, Varptr(User.Fall), 0.0005, Grv ))</code></pre></div><p>and you should be on your way <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-17T11:55:29Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=795#p795</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=793#p793" />
			<content type="html"><![CDATA[<p>I eMailed you the code.</p>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-17T01:46:42Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=793#p793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=792#p792" />
			<content type="html"><![CDATA[<p>is Media/Maps.pk3 in the proper path and is rok.bsp still in there?&nbsp; erroring where it is usually means it cant find it.&nbsp; is it still the attempt to access field or method of null object?&nbsp; if at all possible, we may need to zip it up and send it to me to track it down.&nbsp; if your willing of course.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-17T00:59:51Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=792#p792</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=791#p791" />
			<content type="html"><![CDATA[]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-17T00:50:29Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=791#p791</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=790#p790" />
			<content type="html"><![CDATA[<p>could you please run in debug and then post the debug output?</p><p>thx.</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-16T23:27:32Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=790#p790</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=789#p789" />
			<content type="html"><![CDATA[<p>I was using 1.2 but now that I switched I receive an &quot;Unhandled Exception:Unhandled Memory Exception Error&quot; error for getMesh:IAnimatedMesh(). The DLLs and Mod Caches are updated for 1.3.</p><p>Here&#039;s where the mesh is loaded<br /></p><div class="codebox"><pre><code>Global Usr:User = User.Create( Vector3df.createFromVals( 300, 800, 30 ), IAnimatedMeshMS3D( Scn.getMesh( &quot;Media/NinjaTest.ms3d&quot; )))</code></pre></div>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-16T19:12:05Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=789#p789</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=788#p788" />
			<content type="html"><![CDATA[<p>is it still giving you that on the setposition(getcollisionresultposition())?&nbsp; this may seem like a silly question but i have to ask...&nbsp; have you checked for any copies of the v1.2 DLL that it may be using instead of the v1.3?</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-16T17:28:53Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=788#p788</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=787#p787" />
			<content type="html"><![CDATA[<p>It showed no other runtime errors. Besides &quot;Unhandled Exception:Unhandled Memory Exception Error&quot;</p>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-16T17:25:44Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=787#p787</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=784#p784" />
			<content type="html"><![CDATA[<p>to narrow it down, lets put this in front of your user.node.setposition(col.getcollisionresultposition()) call:<br /></p><div class="codebox"><pre><code>        If Not user Or Not user.node Or Not user.node.isvalid() Or Not user.node.getposition() Then RuntimeError &quot;user&quot;
        If Not user.Ellipsoid Or Not user.Ellipsoid.isvalid() Then RuntimeError &quot;ellipsoid&quot;
        If Not user.velocity Or Not user.velocity.isvalid() Then RuntimeError &quot;velocity&quot;
        If Not user.triangle Or Not user.triangle.isvalid() Then RuntimeError &quot;triangle&quot;
        If Not grv Or Not grv.isvalid() Then RuntimeError &quot;gravity&quot;
        If Not Col.getCollisionResultPosition( Slc, User.Node.getPosition(), User.Ellipsoid, User.Velocity, User.Triangle, User.Fall, 0.0005, Grv ) Then RuntimeError &quot;getcollisionresultposition&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2007-04-16T12:12:04Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=784#p784</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem with collision result position]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=781#p781" />
			<content type="html"><![CDATA[<p>I am still receiving the same error. Here is what I&#039;m working with.</p><div class="codebox"><pre><code>Global Grv:Vector3df = Vector3df.createFromVals( 0, 0.5, 0 )

&#039;///////////////////// Map //////////////////////
Local BSP:IAnimatedMesh = Scn.getMesh( &quot;rok.bsp&quot; )
Local Map:ISceneNode

If( BSP.isValid()) Then Map = Scn.addOctTreeSceneNode( Bsp.getMesh( 0 ))

Global Slc:ITriangleSelector

If( Map.isValid())
    Map.setPosition( Vector3df.createFromVals( 0, 0, 0 ))
    
     Slc = Scn.createOctTreeTriangleSelector( BSP.getMesh( 0 ), Map, 128 )
    Map.setTriangleSelector( Slc )
EndIf

&#039;////////////////// Game Types //////////////////
Type User
    Global Mesh:IAnimatedMeshMS3D    &#039;User Mesh
    Global Node:IAnimatedMeshSceneNode    &#039;User Scenenode
    Global Ellipsoid:Vector3df = Vector3df.createFromVals( 15, 15, 15 )    &#039;User Collision Ellipsoid
    Global Velocity:Vector3df = Vector3df.create()    &#039;User Velocity
    Global State:String    &#039;User State
    Global Stealth:Int    &#039;Level of Stealth
    Global Health:Float    &#039;User Health
    Global Armor:Float    &#039;User Armor
    Global Item:String[][]    &#039;User Item Name, Selected Item Slot
    Global Weapon:String[][]    &#039;User Weapon Name, Selected Weapon Slot
    Global Animation:Int[][] = [[1, 41], [1, 1], [1, 1], [120, 153], [89, 119]] &#039;Stand, Walk, Run, Jump, Crawl
    Global Triangle:Triangle3df = Triangle3df.create()
    Global Fall:Int Ptr    &#039;User is Falling
    
    Function Create:User( Pos:Vector3df, Msh:IAnimatedMeshMS3D )
        Local U:User = New User    &#039;New User Instance
        
        User.MESH = Msh
        User.State = &quot;Stand&quot;
        User.Node = Scn.addAnimatedMeshSceneNode( U.MESH )
        User.Node.setPosition( Pos )
        User.Node.setMaterialFlag( EMF_LIGHTING, False )
        User.Node.setDebugDataVisible( True )
        User.Node.setAnimationSpeed( 0 )
        Return U
    End Function
    
    Function Update()
        Select User.State
            Case &quot;Stand&quot;
                If User.Node.getFrameNr() &gt; User.Animation[0][1] Then User.Node.setCurrentFrame( User.Animation[0][0] )
            Case &quot;Walk&quot;
                If User.Node.getFrameNr() &gt; User.Animation[1][1] Then User.Node.setCurrentFrame( User.Animation[1][0] )
            Case &quot;Run&quot;
                If User.Node.getFrameNr() &gt; User.Animation[2][1] Then User.Node.setCurrentFrame( User.Animation[2][0] )
            Case &quot;Jump&quot;
                If User.Node.getFrameNr() &gt; User.Animation[3][1] Then User.Node.setCurrentFrame( User.Animation[3][0] )
            Case &quot;Flip&quot;
                If User.Node.getFrameNr() &gt; User.Animation[3][1] Then User.Node.setCurrentFrame( User.Animation[3][0] )
            Case &quot;Leap&quot;
            Case &quot;Crouch&quot;
            Case &quot;Crawl&quot;
                If User.Node.getFrameNr() &gt; User.Animation[4][1] Then User.Node.setCurrentFrame( User.Animation[4][0] )
            Case &quot;Climb&quot;
            Case &quot;Fall&quot;
            Case &quot;Use&quot;
            Case &quot;Action&quot;
            Case &quot;Hurt&quot;
            Case &quot;Dead&quot;
        End Select
        
        User.Node.setPosition( Col.getCollisionResultPosition( Slc, User.Node.getPosition(), User.Ellipsoid, User.Velocity, User.Triangle, User.Fall, 0.0005, Grv ))
    End Function
End Type</code></pre></div>]]></content>
			<author>
				<name><![CDATA[HondaDarrell]]></name>
				<uri>https://gprogs.com/profile.php?id=84</uri>
			</author>
			<updated>2007-04-15T22:28:07Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=781#p781</id>
		</entry>
</feed>
