Page 1 of 4 123 ... LastLast
Results 1 to 40 of 122
  1. #1
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default Relative Physics Problem

    Greetings,

    I have developed rough code for controlling a biplane vehicle; however, it doesn't function correctly. It seems as if the modifiers I have applied are acting on it globally, not locally. In-game, when I enter the vehicle, it initially seems to control as I wish it to, but further testing reveals it's not controlling how it should.

    I think my main issue is that I am unfamiliar with UnrealScript and UDK - I believe I am using the wrong methods to manipulate the biplane's physics.

    Any help? This is rather urgent. Code attached below.

    Code:
    class AR_Aircraft extends UTAirVehicle;
    
    /* etc */ 
    
    var float AR_Lift, AR_Forward, AR_MaxLift, AR_TurnSpeed;
    var Vector AR_UpwardsNormal;
    var Rotator AR_Rotation;
    
    /* etc */ 
    
    // Code in development; exact values to be tweaked.
    simulated function AirRaidKinematics(float DeltaTime)
    {
    	local Vector AR_ForceApplication, AR_ForceRotation, AR_ForwardsNormal;
    
    	// While there is a player in the biplane:
    	if (PlayerController(Controller) != None)
    	{
    		AR_ForwardsNormal = Normal(Vector(Rotation));
    
    		// Calculate UpwardsNormal of the plane so I can lift it in that direction:
    		AR_UpwardsNormal.X = - AR_ForwardsNormal.Z;
    		AR_UpwardsNormal.Y =  AR_ForwardsNormal.Y;
    		AR_UpwardsNormal.Z =  AR_ForwardsNormal.X;
    		
    
    		// Calculate AR_Rotation so we know how the plane lifts:
    		AR_ForceRotation.X = 35 * Steering; // Steering is between -1 and 1	
    		AR_ForceRotation.Y = 30 * Throttle; // Throttle is between -1 and 1
    		AR_ForceRotation.Z = 12 * Steering; // Rise is between -1 and 1
    
    		AR_Forward = 500; // Will allow variable forwards speed later
    		
    		// Calculate lift for the biplane:
    		AR_Lift = AR_Forward * 1.5 * Abs(Cos(Rotation.Pitch));
    		if (AR_Lift > AR_MaxLift) AR_Lift = AR_MaxLift;
    
    		// This is meant to calculate the applied force for the biplane,
    		// to give it lift upwards relative to its normal:
    		AR_ForceApplication.X = AR_UpwardsNormal.X * AR_Lift + AR_Forward;
    		AR_ForceApplication.Y = AR_UpwardsNormal.Y * AR_Lift;
    		AR_ForceApplication.Z = AR_UpwardsNormal.Z * AR_Lift;
    		
    		// Propel the biplane
    		AddForce(AR_ForceApplication);
    
    		// Rotate the biplane
    		AddTorque(AR_ForceRotation);
    	}
    	else
    	{
    		AR_Lift = 0;
    		AR_Rotation.Pitch = 0;
    		AR_Rotation.Yaw = 0;
    		AR_Rotation.Roll = 0;
    	}
    }
    
    
    simulated function Tick(float DeltaTime)
    {
    	AirRaidKinematics(DeltaTime);
    	Super.Tick(DeltaTime);
    }
    
    /* etc */
    Thanks.
    Last edited by Syhon; 05-23-2010 at 12:29 AM. Reason: Project is rather urgent now; any help appreciated.
    ...Sang et Roses... une métaphore ludique...

  2. #2

    Default

    It would help greatly if you could tell us what that does, how it behaves and how it's meant to behave, otherwise its difficult to know what to look for.

    However, from a quick once-over, a few possibilities arise:

    For one, on this line:
    AR_ForceRotation.Z = 12 * Steering
    The comment would make it seem as though you meant to type:
    AR_ForceRotation.Z = 12 * Rise

    Secondly, Rotation values are not stored in Radians OR Degrees, but UnrealRot values. I'm not certain that Cos works on UnrealRots though, so something to look into, you mave have to convert units.

  3. #3
    Redeemer
    Join Date
    Apr 2010
    Location
    Middle East - Kingdom of Bahrain
    Posts
    1,261

    Default

    Try replacing this:

    Code:
    // Calculate AR_Rotation so we know how the plane lifts:
    		AR_ForceRotation.X = 35 * Steering; // Steering is between -1 and 1	
    		AR_ForceRotation.Y = 30 * Throttle; // Throttle is between -1 and 1
    		AR_ForceRotation.Z = 12 * Steering; // Rise is between -1 and 1


    with...

    Code:
    // Calculate AR_Rotation so we know how the plane lifts:
    		AR_ForceRotation.X = 100 * 35 * Steering; // Steering is between -1 and 1	
    		AR_ForceRotation.Y = 100 * 30 * Throttle; // Throttle is between -1 and 1
    		AR_ForceRotation.Z = 100 * 12 * Steering; // Rise is between -1 and 1
    Because while I was working with some camera tilting functionality, I wanted to rotate it on the X axis to roll by 15 degrees... I noticed that when I scale it up to 1500, it gives me the rotation I wanted... I don't know why this is happening, it may not help your case, but you could try and perhaps you have a similar issue to mine.

  4. #4
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,953

    Default

    rotators have a range of 65535 units
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  5. #5
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default

    Apologies, the steering of the biplane is as follows:
    The biplane will roll (and yaw slightly) upon pressing 'A' and 'D' keys.
    The biplane will pitch up and down by pressing the 'W' and 'S' keys.

    This works, using the values from Steering and Throttle.
    Code:
    AR_ForceRotation.Z = 12 * Steering
    This line is deliberate (at least for now), imitating the slight yaw the biplane will have when it rolls. Sorry for the confusion, that was my fault.

    Every tick, the biplane is to be pushed forward based on its propulsion, and upwards based off its lift.
    Now, this all appears to be working somewhat; however, the problem is that the forces are apparently being applied from a global perspective.

    For example: its forward-push is always in the global x-axis, instead of being pushed forward in the direction of the plane's heading. The pitch and roll is also applied globally, so that when the biplane is facing another direction, the pitch will still rotate it in global angles, thus meaning it can't turn and then pitch down properly.

    I hope this makes sense. Sorry Seenooh, that just made the rotation super duper fast. I'm looking at these lines to be the culprit:

    Code:
    		// Propel the biplane
    		AddForce(AR_ForceApplication);
    
    		// Rotate the biplane
    		AddTorque(AR_ForceRotation);
    However, I'm not sure. Would it be more beneficial to include all my scripts in a link?
    ...Sang et Roses... une métaphore ludique...

  6. #6
    Redeemer
    Join Date
    Apr 2010
    Location
    Middle East - Kingdom of Bahrain
    Posts
    1,261

    Default

    I'm not sure, but I think your problem is here:

    Code:
    AR_ForwardsNormal = Normal(Vector(Rotation));
    and here

    Code:
    // Calculate UpwardsNormal of the plane so I can lift it in that direction:
    AR_UpwardsNormal.X = - AR_ForwardsNormal.Z;
    AR_UpwardsNormal.Y =  AR_ForwardsNormal.Y;
    AR_UpwardsNormal.Z =  AR_ForwardsNormal.X;

    You are trying to get the forward vector that the plane is facing in a wrong way. Also AR_UpwardsNormal calculation is incorrect. This is basically the up vector relative to the plane. I think you should try this instead:

    Code:
    local vector Y; 
    
    GetAxes(Rotation,AR_ForwardsNormal,Y,AR_UpwardsNormal);
    Hope that helps.
    Last edited by seenooh; 05-23-2010 at 02:57 PM.

  7. #7
    Palace Guard

    Join Date
    Jul 2006
    Location
    WorldInfo_61
    Posts
    3,560
    Gamer IDs

    Gamertag: KickedWhoCares

    Default

    Id have to agree seenooh, when they posted earlier I double checked over this and the normalized vector rotation is the only major difference between this force application and that of the scorpions booster. That leads me to believe this is whats causing your local vs world coordinate system problem

  8. #8
    Redeemer
    Join Date
    Apr 2010
    Location
    Middle East - Kingdom of Bahrain
    Posts
    1,261

    Default

    Quote Originally Posted by MonsOlympus View Post
    Id have to agree seenooh, when they posted earlier I double checked over this and the normalized vector rotation is the only major difference between this force application and that of the scorpions booster. That leads me to believe this is whats causing your local vs world coordinate system problem
    Yeah I think that's the issue.

    Anyways I editted my previous post because I think I found another problem...

  9. #9
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default

    Thanks Seenooh, and MonsOlympus, that fix was very helpful and has fixed the movement considerably.

    However, I still have the particular problem where the rotations are being applied globally. Let me try to illustrate:



    Similarly, if I rotate the biplane around so it is facing down the negative x-axis: it continues backwards, still going forward in the global x-axis.
    ...Sang et Roses... une métaphore ludique...

  10. #10
    Redeemer
    Join Date
    Apr 2010
    Location
    Middle East - Kingdom of Bahrain
    Posts
    1,261

    Default

    You welcome. =)

    Look here:

    Code:
    // Calculate lift for the biplane:
    AR_Lift = AR_Forward * 1.5 * Abs(Cos(Rotation.Pitch));
    Do you see in my previous post where I declared local Y ? Then GetAxes? Y becomes the Y axis relative to your object... So try this out:

    Code:
    AR_Lift = AR_Forward * 1.5 * Abs(Cos(Y.Pitch));
    I believe wherever you use Rotation in your calculations it'll give you that global issue. I hope this helps you out.
    Last edited by seenooh; 05-24-2010 at 04:44 AM.
    Hamad Al-Hasan
    Gameplay Programmer / Technical Artist
    Portfolio: http://www.alhasanstudio.com/

    Personal Project: zBioBlow !


    UDK Version: Feb-2013
    OS: Windows 7 Ultimate 64-bit - Service Pack 1
    Intel Core i7 960 3.2 GHz 8MB L3 Cache LGA 1366 130W Quad Core CPU
    12 GB DDR3 Mushkin PC3-12800 998959 (6 x 2048MB) 6-9-7-24 1.65V Blackline
    ASUS Sabertooth X58 LGA 1366 Intel X58 SATA 6Gb/s USB 3.0 ATX Intel Motherboard
    EVGA GTX 580 1.5 GB GDDR5 - Driver Version: 296.10

  11. #11
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default

    Code:
    AR_Lift = AR_Forward * 1.5 * Abs(Cos(Y.Pitch));
    That piece of code doesn't compile, as Y is a Vector. Rotation.Pitch does work for that piece of code, but your contribution is still appreciated, thanks.

    (I have previously noted to myself that it would be more correct to check the current Pitch against the Pitch of the plane's Velocity-Vector; however, I'm happy with the responsiveness of the movement that this code simulates, for the purposes of the cartoon-ish game I am attempting to create.)


    I did have a fresh look at the rest of my code though, and determined this replacement:
    Code:
    // This gives lift upwards relative to its up-axis and push forwards relative to its forward-axis:
    AR_ForceApplication.X = AR_UpwardsNormal.X * AR_Lift + AR_ForwardsNormal.X * AR_Forward;
    AR_ForceApplication.Y = AR_UpwardsNormal.Y * AR_Lift + AR_ForwardsNormal.Y * AR_Forward;
    AR_ForceApplication.Z = AR_UpwardsNormal.Z * AR_Lift + AR_ForwardsNormal.Z * AR_Forward;
    That fixes the "always travels forward along the global x-axis" issue. Of course, I should have seen it before.

    (Incidentally, does anyone know why UDK decided to swap all the axes around, so that the x-axis in UDK is actually the z-axis for most normal 3D systems?)


    Regardless, the main issue is still how rotation is applied. Everything else works now, save for the issue demonstrated in my crude diagram above: if I spin the plane around in one axis, it no longer rotates correctly when rotating about another axis. It treats the current orientation of the plane as global orientation. I think it has to do with the following line but I am not sure exactly why it would be wrong, apart from the fact it just seems to apply the values globally:

    Code:
    // Rotate the biplane
    AddTorque(AR_ForceRotation);
    Thank you for all your help so far. I'm still looking at the code; I'll post back here if I solve it. Thanks.
    ...Sang et Roses... une métaphore ludique...

  12. #12
    Veteran
    Join Date
    May 2007
    Location
    Above KillZ, Below StallZ
    Posts
    9,953

    Default

    in any system i've ever worked with (admittedly not many), up/down is Z ...
    http://www.ericbla.de http://www.dungeondefenders.com http://en.wikipedia.org/wiki/Warm_Gun http://www.rekoil.com http://www.groundbranch.com

    - Please don't send me private messages asking programming questions, those would be better asked on the Programming forum here. Thanks

  13. #13
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default Current Solution

    As I said, "AddTorque" does apply globally, so my workaround has been to manually calculate the relative torque-add components, then apply them in that global sense. I used the normals from the "GetAxes" method that Seenooh gave me.

    Apropos, Vector "Y" is now renamed "AR_SidewardsNormal":

    Code:
    GetAxes(Rotation, AR_ForwardsNormal, AR_SidewardsNormal, AR_UpwardsNormal);
    
    // It's probably unnecessary to normalise these:
    AR_ForceRotationVectX = Normal(AR_ForwardsNormal);
    AR_ForceRotationVectY = Normal(AR_SidewardsNormal);
    AR_ForceRotationVectZ = Normal(AR_UpwardsNormal);
    
    // Calculate the XYZ components of the relative steering:
    AR_ForceRotationVectX.X *= 35 * Steering; // Steering is between -1 and 1	
    AR_ForceRotationVectX.Y *= 35 * Steering; // Steering is between -1 and 1	
    AR_ForceRotationVectX.Z *= 35 * Steering; // Steering is between -1 and 1	
    
    AR_ForceRotationVectY.X *= 30 * Throttle; // Throttle is between -1 and 1
    AR_ForceRotationVectY.Y *= 30 * Throttle; // Throttle is between -1 and 1
    AR_ForceRotationVectY.Z *= 30 * Throttle; // Throttle is between -1 and 1
    
    AR_ForceRotationVectZ.X *= 12 * Rise; // Rise is between -1 and 1
    AR_ForceRotationVectZ.Y *= 12 * Rise; // Rise is between -1 and 1
    AR_ForceRotationVectZ.Z *= 12 * Rise; // Rise is between -1 and 1
    
    // Add them together to get final global rotation vector:
    AR_ForceRotation.X = AR_ForceRotationVectX.X + AR_ForceRotationVectY.X + AR_ForceRotationVectZ.X;
    AR_ForceRotation.Y = AR_ForceRotationVectX.Y + AR_ForceRotationVectY.Y + AR_ForceRotationVectZ.Y;
    AR_ForceRotation.Z = AR_ForceRotationVectX.Z + AR_ForceRotationVectY.Z + AR_ForceRotationVectZ.Z;
    I probably could have used a better naming convention... Anyway, now there's mainly tweaking to do. I'll post back here with the final script (if I ever finalise it). I'll probably start other threads as I find separate issues.

    Thanks for all your help!

    PS: Strange, in basically all my studies, Y-axis is up and Z-axis faces outwards/forwards. I come less from a game-engine-user perspective and more from Mathematics, but maybe I'm wrong. I guess it doesn't matter either way, as long as I know which is which for UDK.
    ...Sang et Roses... une métaphore ludique...

  14. #14
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default Finalised Code, somewhat.

    Using the below key bindings, my AR_Aircraft class has the following code:

    Code:
    class AR_Aircraft extends UTAirVehicle;
    
    /* etc */ 
    
    var float AR_MaxLift, AR_TurnSpeed, AR_Speed, AR_CurrentForward, AR_AddedLiftSpeed, AR_Acceleration;
    
    /* etc */
    
    simulated function AirRaidKinematics(float DeltaTime)
    {
    	local Vector AR_ForceApplication, AR_ForceRotation, AR_ForwardsNormal, AR_UpwardsNormal, AR_SidewardsNormal;
    	local Vector AR_ForceRotationVectX, AR_ForceRotationVectY, AR_ForceRotationVectZ;
    	local float AR_Lift, AR_ForwardSpeed, AR_NewRise;
    
    	// While there is a player in the biplane:
    	if (PlayerController(Controller) != None)
    	{
    		GetAxes(Rotation, AR_ForwardsNormal, AR_SidewardsNormal, AR_UpwardsNormal);
    		
    		// It's probably unnecessary to normalise these:
    		AR_ForceRotationVectX = Normal(AR_ForwardsNormal);
    		AR_ForceRotationVectY = Normal(AR_SidewardsNormal);
    		AR_ForceRotationVectZ = Normal(AR_UpwardsNormal);
    
    		// Rise is NOT between -1 and 1, like it said it was
    		AR_NewRise = 0;
    		if (Rise != 0) AR_NewRise = Rise / Abs(Rise); // Avoid divide by 0
    
    		// Calculate the XYZ components of the relative steering:
    		// Generic controls Steering, Throttle and Rise are set by the controller
    
    		// Roll
    		AR_ForceRotationVectX.X *= 35 * -AR_NewRise; // Steering is between -1 and 1	
    		AR_ForceRotationVectX.Y *= 35 * -AR_NewRise; // Steering is between -1 and 1	
    		AR_ForceRotationVectX.Z *= 35 * -AR_NewRise; // Steering is between -1 and 1	
    
    		// Pitch
    		AR_ForceRotationVectY.X *= 30 * Throttle; // Throttle is between -1 and 1
    		AR_ForceRotationVectY.Y *= 30 * Throttle; // Throttle is between -1 and 1
    		AR_ForceRotationVectY.Z *= 30 * Throttle; // Throttle is between -1 and 1
    
    		// Yaw
    		AR_ForceRotationVectZ.X *= 25 * -Steering; // AR_NewRise is between -1 and 1
    		AR_ForceRotationVectZ.Y *= 25 * -Steering; // AR_NewRise is between -1 and 1
    		AR_ForceRotationVectZ.Z *= 25 * -Steering; // AR_NewRise is between -1 and 1
    
    		// Add them together to get final global rotation vector:
    		AR_ForceRotation.X = AR_ForceRotationVectX.X + AR_ForceRotationVectY.X + AR_ForceRotationVectZ.X;
    		AR_ForceRotation.Y = AR_ForceRotationVectX.Y + AR_ForceRotationVectY.Y + AR_ForceRotationVectZ.Y;
    		AR_ForceRotation.Z = AR_ForceRotationVectX.Z + AR_ForceRotationVectY.Z + AR_ForceRotationVectZ.Z;
    
    		AR_CurrentForward += AR_Acceleration * Throttle;
    		AR_ForwardSpeed = AR_CurrentForward * 2.2;
    		// AR_ForwardSpeed is not necessarily true - I'd optimally need to use some 
    		// calculation based off Velocity and current forwards direction Vector...
    
    		// Calculate lift for the biplane:
    		AR_Lift = (AR_ForwardSpeed + AR_AddedLiftSpeed) * Abs(Cos(Rotation.Pitch));
    		if (AR_Lift > AR_MaxLift) AR_Lift = AR_MaxLift;
    		
    		// This gives lift upwards relative to its up-axis and push forwards relative to its forward-axis:
    		AR_ForceApplication.X = AR_UpwardsNormal.X * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.X;
    		AR_ForceApplication.Y = AR_UpwardsNormal.Y * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.Y;
    		AR_ForceApplication.Z = AR_UpwardsNormal.Z * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.Z;
    		
    		// Add forces and rotations
    		Mesh.AddForce(AR_ForceApplication);
    		Mesh.AddTorque(AR_ForceRotation);
    	}
    	else
    	{
    		AR_CurrentForward = AR_Speed; // Biplane propellor thrust sets to default
    	}
    }
    
    
    simulated function Tick(float DeltaTime)
    {
    	AirRaidKinematics(DeltaTime);
    	Super.Tick(DeltaTime);
    }
    
    /* etc */
    Note, to implement the aircraft 'properly' as UDK does, I have three classes: AR_Aircraft (extends UTAirVehicle), AR_AircraftContent (extends AR_Aircraft), and AR_AircraftFactory (extends UTVehicleFactory). For more information, look at the Cicada. The code for the AR_Aircraft class above should help anyone implement (very) rough aircraft physics.

    As mentioned, I changed the key bindings for my specific game inside UTInput.ini:
    Code:
    Bindings=(Name="SpaceBar",Command="GBA_Jump")
    Bindings=(Name="W",Command="GBA_MoveForward")
    Bindings=(Name="S",Command="GBA_Backward")
    Bindings=(Name="A",Command="GBA_StrafeLeft")
    Bindings=(Name="Q",Command="GBA_Duck")
    Bindings=(Name="E",Command="GBA_Jump")
    Bindings=(Name="D",Command="GBA_StrafeRight")
    Bindings=(Name="LeftControl",Command="GBA_Use")
    Q, E to roll.
    A, D to yaw.
    W, S to pitch (also gains speed).
    LeftControl to hop in or out (replaces E).
    (Without changing bindings, the normal controls would be C, Spacebar to roll)

    By all means, take the code, extend it, and reply to me with what you've done with it.

    Thanks; enjoy.
    ...Sang et Roses... une métaphore ludique...

  15. #15
    Skaarj
    Join Date
    Jan 2008
    Location
    Denmark
    Posts
    20

    Default

    where is the AR_AircraftContent and AR_AircraftFactory code... can not get this to work...

  16. #16
    Skaarj
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    11
    Gamer IDs

    Gamertag: Syhon

    Default

    Quote Originally Posted by KongWeezY View Post
    where is the AR_AircraftContent and AR_AircraftFactory code... can not get this to work...
    Your Factory and Content scripts should extend the ones I said, and the content is trivial, merely telling UDK what models you're going to be using. You would be best to write your own, but here's an example:
    Code:
    class AR_AircraftFactory extends UTVehicleFactory placeable;
    
    defaultproperties
    {
    	Begin Object Name=SVehicleMesh
    		SkeletalMesh=SkeletalMesh'AR_Content.AR_Biplane'
    		Translation=(X=-40.0,Y=0.0,Z=-70.0)
    	End Object
    
    
    	Begin Object Name=CollisionCylinder
    		CollisionHeight=+120.0
    		CollisionRadius=+200.0
    		Translation=(X=0.0,Y=0.0,Z=-40.0)
    	End Object
    
    	VehicleClassPath="AirRaid.AR_AircraftContent"
    	DrawScale=1
    }
    ...Sang et Roses... une métaphore ludique...

  17. #17
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    Syhon, I have to thank you. Your post helped me to make my spaceship move. After a couple of weeks I ended up with this: http://www.youtube.com/watch?v=FdkKXo5b09U.
    For more details have a look at my Work in Progress thread, it's linked to in my sig.

  18. #18
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    I have the code working and my airplane yaws, pitches and rotates but it does not move as in I cannot control it. I want to go foward then turn left then come into land can't do it because it is just acting like a helicopter up/down, yaw and pitch but it has no speed so I can't go forward or any other direction I can only face in different directions and it does move slightly on it own but without my control so it will just float away.

    Please help. Thanks.

  19. #19
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    @GentlemenGraphics: Could you post your code and a video showing the described behavior on youtube or the like? Otherwise it is nearly impossible to figure out your problem.

  20. #20
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Ok here's the three code files for the airplane:

    AR_Aircraft.uc

    class AR_Aircraft extends UTAirVehicle;

    /* etc */

    var float AR_MaxLift, AR_TurnSpeed, AR_Speed, AR_CurrentForward, AR_AddedLiftSpeed, AR_Acceleration;

    /* etc */

    simulated function AirRaidKinematics(float DeltaTime)
    {
    local Vector AR_ForceApplication, AR_ForceRotation, AR_ForwardsNormal, AR_UpwardsNormal, AR_SidewardsNormal;
    local Vector AR_ForceRotationVectX, AR_ForceRotationVectY, AR_ForceRotationVectZ;
    local float AR_Lift, AR_ForwardSpeed, AR_NewRise;

    // While there is a player in the biplane:
    if (PlayerController(Controller) != None)
    {
    GetAxes(Rotation, AR_ForwardsNormal, AR_SidewardsNormal, AR_UpwardsNormal);

    // It's probably unnecessary to normalise these:
    AR_ForceRotationVectX = Normal(AR_ForwardsNormal);
    AR_ForceRotationVectY = Normal(AR_SidewardsNormal);
    AR_ForceRotationVectZ = Normal(AR_UpwardsNormal);

    // Rise is NOT between -1 and 1, like it said it was
    AR_NewRise = 0;
    if (Rise != 0) AR_NewRise = Rise / Abs(Rise); // Avoid divide by 0

    // Calculate the XYZ components of the relative steering:
    // Generic controls Steering, Throttle and Rise are set by the controller

    // Roll
    AR_ForceRotationVectX.X *= 35 * -AR_NewRise; // Steering is between -1 and 1
    AR_ForceRotationVectX.Y *= 35 * -AR_NewRise; // Steering is between -1 and 1
    AR_ForceRotationVectX.Z *= 35 * -AR_NewRise; // Steering is between -1 and 1

    // Pitch
    AR_ForceRotationVectY.X *= 30 * Throttle; // Throttle is between -1 and 1
    AR_ForceRotationVectY.Y *= 30 * Throttle; // Throttle is between -1 and 1
    AR_ForceRotationVectY.Z *= 30 * Throttle; // Throttle is between -1 and 1

    // Yaw
    AR_ForceRotationVectZ.X *= 25 * -Steering; // AR_NewRise is between -1 and 1
    AR_ForceRotationVectZ.Y *= 25 * -Steering; // AR_NewRise is between -1 and 1
    AR_ForceRotationVectZ.Z *= 25 * -Steering; // AR_NewRise is between -1 and 1

    // Add them together to get final global rotation vector:
    AR_ForceRotation.X = AR_ForceRotationVectX.X + AR_ForceRotationVectY.X + AR_ForceRotationVectZ.X;
    AR_ForceRotation.Y = AR_ForceRotationVectX.Y + AR_ForceRotationVectY.Y + AR_ForceRotationVectZ.Y;
    AR_ForceRotation.Z = AR_ForceRotationVectX.Z + AR_ForceRotationVectY.Z + AR_ForceRotationVectZ.Z;

    AR_CurrentForward += AR_Acceleration * Throttle;
    AR_ForwardSpeed = AR_CurrentForward * 2.2;
    // AR_ForwardSpeed is not necessarily true - I'd optimally need to use some
    // calculation based off Velocity and current forwards direction Vector...

    // Calculate lift for the biplane:
    AR_Lift = (AR_ForwardSpeed + AR_AddedLiftSpeed) * Abs(Cos(Rotation.Pitch));
    if (AR_Lift > AR_MaxLift) AR_Lift = AR_MaxLift;

    // This gives lift upwards relative to its up-axis and push forwards relative to its forward-axis:
    AR_ForceApplication.X = AR_UpwardsNormal.X * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.X;
    AR_ForceApplication.Y = AR_UpwardsNormal.Y * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.Y;
    AR_ForceApplication.Z = AR_UpwardsNormal.Z * AR_Lift + AR_CurrentForward * AR_ForwardsNormal.Z;

    // Add forces and rotations
    Mesh.AddForce(AR_ForceApplication);
    Mesh.AddTorque(AR_ForceRotation);
    }
    else
    {
    AR_CurrentForward = AR_Speed; // Biplane propellor thrust sets to default
    }
    }


    simulated function Tick(float DeltaTime)
    {
    AirRaidKinematics(DeltaTime);
    Super.Tick(DeltaTime);
    }

    /* etc */

    UTVehicle_AR_Aircraft_Content.uc

    class UTVehicle_AR_Aircraft_Content extends AR_Aircraft;

    defaultproperties
    {
    Begin Object Name=CollisionCylinder
    CollisionHeight=+70.0
    CollisionRadius=+240.0
    Translation=(X=-40.0,Y=0.0,Z=40.0)
    End Object

    Begin Object Name=SVehicleMesh
    SkeletalMesh=SkeletalMesh'VH_Cicada.Mesh.SK_VH_Cic ada'
    AnimTreeTemplate=AnimTree'VH_Cicada.Anims.AT_VH_Ci cada'
    PhysicsAsset=PhysicsAsset'VH_Cicada.Mesh.SK_VH_Cic ada_Physics'
    AnimSets.Add(AnimSet'VH_Cicada.Anims.VH_Cicada_Ani ms')
    End Object

    DrawScale=1.3

    Health=500
    BigExplosionTemplates[0]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Far',MinDistance=350)
    BigExplosionTemplates[1]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Near')
    BigExplosionSocket=VH_Death

    Seats.Empty
    Seats(0)={( GunClass=class'UTVWeap_CicadaMissileLauncher',
    GunSocket=(Gun_Socket_02,Gun_Socket_01),
    CameraTag=ViewSocket,
    TurretControls=(LauncherA,LauncherB),
    CameraOffset=-400,
    CameraBaseOffset=(Z=25.0),
    SeatIconPos=(X=0.48,Y=0.25),
    GunPivotPoints=(Main),
    WeaponEffects=((SocketName=Gun_Socket_01,Offset=(X =-80),Scale3D=(X=12.0,Y=15.0,Z=15.0)),(SocketName=Gu n_Socket_02,Offset=(X=-80),Scale3D=(X=12.0,Y=15.0,Z=15.0)))
    )}

    Seats(1)={( GunClass=class'UTVWeap_CicadaTurret',
    GunSocket=(Turret_Gun_Socket_01,Turret_Gun_Socket_ 02,Turret_Gun_Socket_03,Turret_Gun_Socket_04),
    TurretVarPrefix="Turret",
    TurretControls=(Turret_Rotate),
    CameraTag=Turret_ViewSocket,
    CameraOffset=0,
    GunPivotPoints=(MainTurret_Pitch),
    CameraEyeHeight=0,
    SeatIconPos=(X=0.48,Y=0.56),
    ViewPitchMin=-14000.0,
    ViewPitchMax=1.0,
    WeaponEffects=((SocketName=Turret_Gun_Socket_04,Of fset=(X=-80),Scale3D=(X=8.0,Y=10.0,Z=10.0)),(SocketName=Tur ret_Gun_Socket_03,Offset=(X=-80),Scale3D=(X=8.0,Y=10.0,Z=10.0)))
    )}




    VehicleEffects.Empty

    VehicleEffects(0)=(EffectStartTag=TurretWeapon00,E ffectEndTag=STOP_TurretWeapon00,EffectTemplate=Par ticleSystem'VH_Cicada.Effects.P_VH_Cicada_2ndAltFl ash',EffectSocket=Turret_Gun_Socket_01)
    VehicleEffects(1)=(EffectStartTag=TurretWeapon01,E ffectEndTag=STOP_TurretWeapon01,EffectTemplate=Par ticleSystem'VH_Cicada.Effects.P_VH_Cicada_2ndAltFl ash',EffectSocket=Turret_Gun_Socket_02)
    VehicleEffects(2)=(EffectStartTag=TurretWeapon02,E ffectEndTag=STOP_TurretWeapon02,EffectTemplate=Par ticleSystem'VH_Cicada.Effects.P_VH_Cicada_2ndAltFl ash',EffectSocket=Turret_Gun_Socket_03)
    VehicleEffects(3)=(EffectStartTag=TurretWeapon03,E ffectEndTag=STOP_TurretWeapon03,EffectTemplate=Par ticleSystem'VH_Cicada.Effects.P_VH_Cicada_2ndAltFl ash',EffectSocket=Turret_Gun_Socket_04)

    VehicleEffects(4)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_Cicada.Effects.P_VH_Cicada_GroundEffect',Effect Socket=GroundEffectBase)
    VehicleEffects(5)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_Cicada.Effects.P_VH_Cicada_Exhaust',EffectSocke t=LeftExhaust)
    VehicleEffects(6)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_Cicada.Effects.P_VH_Cicada_Exhaust',EffectSocke t=RightExhaust)
    VehicleEffects(7)=(EffectStartTag=DamageSmoke,Effe ctEndTag=NoDamageSmoke,bRestartRunning=false,Effec tTemplate=ParticleSystem'Envy_Effects.Vehicle_Dama ge.P_Vehicle_Damage_1_Cicada',EffectSocket=DamageS moke_01)

    VehicleAnims(0)=(AnimTag=Created,AnimSeqs=(InActiv eStill),AnimRate=1.0,bAnimLoopLastSeq=false,AnimPl ayerName=CicadaPlayer)
    VehicleAnims(1)=(AnimTag=EngineStart,AnimSeqs=(Get In),AnimRate=1.0,bAnimLoopLastSeq=false,AnimPlayer Name=CicadaPlayer)
    VehicleAnims(2)=(AnimTag=Idle,AnimSeqs=(Idle),Anim Rate=1.0,bAnimLoopLastSeq=true,AnimPlayerName=Cica daPlayer)
    VehicleAnims(3)=(AnimTag=EngineStop,AnimSeqs=(GetO ut),AnimRate=1.0,bAnimLoopLastSeq=false,AnimPlayer Name=CicadaPlayer)


    ContrailEffectIndices=(2,3,4,5,13,14)
    GroundEffectIndices=(10)

    // Sounds
    // Engine sound.
    Begin Object Class=AudioComponent Name=RaptorEngineSound
    SoundCue=SoundCue'A_Vehicle_Cicada.SoundCues.A_Veh icle_Cicada_EngineLoop'
    End Object
    EngineSound=RaptorEngineSound
    Components.Add(RaptorEngineSound);

    CollisionSound=SoundCue'A_Vehicle_Cicada.SoundCues .A_Vehicle_Cicada_Collide'
    EnterVehicleSound=SoundCue'A_Vehicle_Cicada.SoundC ues.A_Vehicle_Cicada_Start'
    ExitVehicleSound=SoundCue'A_Vehicle_Cicada.SoundCu es.A_Vehicle_Cicada_Stop'

    // Scrape sound.
    Begin Object Class=AudioComponent Name=BaseScrapeSound
    SoundCue=SoundCue'A_Gameplay.A_Gameplay_Onslaught_ MetalScrape01Cue'
    End Object
    ScrapeSound=BaseScrapeSound
    Components.Add(BaseScrapeSound);

    // Initialize sound parameters.
    EngineStartOffsetSecs=2.0
    EngineStopOffsetSecs=1.0

    IconCoords=(U=988,V=0,UL=33,VL=42)

    ExplosionSound=SoundCue'A_Vehicle_Cicada.SoundCues .A_Vehicle_Cicada_Explode'



    PassengerTeamBeaconOffset=(X=-125.0f,Y=0.0f,Z=-105.0f);
    ReferenceMovementMesh=StaticMesh'Envy_Effects.Mesh .S_Air_Wind_Ball'

    HudCoords=(U=106,V=125,UL=-106,VL=124)
    TeamMaterials[0]=MaterialInstanceConstant'VH_Cicada.Materials.MI_V H_Cicada_Red'
    TeamMaterials[1]=MaterialInstanceConstant'VH_Cicada.Materials.MI_V H_Cicada_Blue'

    BurnOutMaterial[0]=MaterialInterface'VH_Cicada.Materials.MITV_VH_Cic ada_Red_BO'
    BurnOutMaterial[1]=MaterialInterface'VH_Cicada.Materials.MITV_VH_Cic ada_Blue_BO'

    SpawnMaterialLists[0]=(Materials=(MaterialInterface'VH_Cicada.Materials .MI_VH_Cicada_Spawn_Red'))
    SpawnMaterialLists[1]=(Materials=(MaterialInterface'VH_Cicada.Materials .MI_VH_Cicada_Spawn_Blue'))

    DamageMorphTargets(0)=(InfluenceBone=Lt_Gun_Yaw,Mo rphNodeName=none,Health=150,DamagePropNames=(Damag e2))
    DamageMorphTargets(1)=(InfluenceBone=Rt_Gun_Yaw,Mo rphNodeName=none,Health=150,DamagePropNames=(Damag e2))
    DamageMorphTargets(2)=(InfluenceBone=FrontGuardDam age,MorphNodeName=none,Health=150,DamagePropNames= (Damage1))
    DamageMorphTargets(3)=(InfluenceBone=MainTurret_Ya w,MorphNodeName=none,Health=150,DamagePropNames=(D amage3))

    DamageParamScaleLevels(0)=(DamageParamName=Damage1 ,Scale=3)
    DamageParamScaleLevels(1)=(DamageParamName=Damage2 ,Scale=1.5)
    DamageParamScaleLevels(2)=(DamageParamName=Damage3 ,Scale=2.5)

    DrivingPhysicalMaterial=PhysicalMaterial'VH_Cicada .materials.physmat_Cicada_driving'
    DefaultPhysicalMaterial=PhysicalMaterial'VH_Cicada .materials.physmat_Cicada'

    bHasEnemyVehicleSound=true
    EnemyVehicleSound(0)=SoundNodeWave'A_Character_IGM ale.BotStatus.A_BotStatus_IGMale_EnemyCicada'
    }

    UTVehicleFactory_AR_Aicraft.uc

    class UTVehicleFactory_AR_Aicraft extends UTVehicleFactory placeable;

    defaultproperties
    {
    Begin Object Name=SVehicleMesh
    SkeletalMesh=SkeletalMesh'VH_Cicada.Mesh.SK_VH_Cic ada'
    Translation=(X=-40.0,Y=0.0,Z=-70.0)
    End Object


    Begin Object Name=CollisionCylinder
    CollisionHeight=+120.0
    CollisionRadius=+200.0
    Translation=(X=0.0,Y=0.0,Z=-40.0)
    End Object

    VehicleClassPath="UTGameContent.UTVehicle_AR_Aircr aft_Content"
    DrawScale=1

    }

    Thats the code. Please help me it's really important.

    Thanks.
    Last edited by GentlemenGraphics; 10-02-2011 at 10:09 AM.

  21. #21
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    The code above acts more like a hovering helicopter then a plane please help me fix it.

  22. #22
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    Please use code tags to post code, it makes it better to read.
    Code:
     [codea] insert your code here [/codea] without the a^^
    UTVehicleFactory_AR_Aicraft.uc and UTVehicle_AR_Aircraft_Content.uc are fine.

    Please tell me how familiar you are with vector math, programming and movement related physics. This way I know how much I need to explain.

    For testing purposes you should place your plane in a (big) GravityVolume with a gravity of 0. This will make it easier to see what your code does, because damping, friction and especially gravity will make your life difficult in the beginning.


    The function AirRaidKinematics needs to be fixed, because Syhon hasn't been right about the way forces work on a plane.

    I will try to show you how a simple spaceship is done, since it is way easier and I don't want to write your plane myself. ;-)

    Code:
    simulated function AirRaidKinematics(float DeltaTime)
    {
    local Vector AR_ForceApplication, AR_ForceRotation, AR_ForwardsNormal, AR_UpwardsNormal, AR_SidewardsNormal;
    local Vector AR_ForceRotationVectX, AR_ForceRotationVectY, AR_ForceRotationVectZ;
    local float AR_NewRise;
    
    // While there is a player in the biplane:
    if (PlayerController(Controller) != None)
    {
    GetAxes(Rotation, AR_ForwardsNormal, AR_SidewardsNormal, AR_UpwardsNormal);
    
    // It's probably unnecessary to normalise these:
    AR_ForceRotationVectX = Normal(AR_ForwardsNormal);
    AR_ForceRotationVectY = Normal(AR_SidewardsNormal);
    AR_ForceRotationVectZ = Normal(AR_UpwardsNormal);
    
    // Rise is NOT between -1 and 1, like it said it was
    AR_NewRise = 0;
    if (Rise != 0) AR_NewRise = Rise / Abs(Rise); // Avoid divide by 0
    
    // Calculate the XYZ components of the relative steering:
    // Generic controls Steering, Throttle and Rise are set by the controller
    
    // Roll
    // No rolling for now, I will use q and e for the forward movement for the time being
    // AR_ForceRotationVectX *= 35 * -AR_NewRise; // AR_NewRise is between -1 and 1
    
    // Pitch
    AR_ForceRotationVectY *= 30 * Throttle; // Throttle is between -1 and 1
    
    // Yaw
    AR_ForceRotationVectZ *= 25 * -Steering; // Steering is between -1 and 1
    
    // Add them together to get final global rotation vector:
    AR_ForceRotation = AR_ForceRotationVectX + AR_ForceRotationVectY + AR_ForceRotationVectZ;
    
    // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    
    // Add forces and rotations
    Mesh.AddForce(AR_ForceApplication);
    Mesh.AddTorque(AR_ForceRotation);
    }
    else
    {
    // if nobody is in the plane, don't apply forces to it, do nothing
    }
    }
    Although I haven't tested it, it should work.

    [EDIT] I tested it now, and it works.

    Now for a short explanation of what I did.

    The replacement of lines like:
    Code:
    AR_ForceRotationVectX.X *= 35 * -AR_NewRise; // Steering is between -1 and 1
    AR_ForceRotationVectX.Y *= 35 * -AR_NewRise; // Steering is between -1 and 1
    AR_ForceRotationVectX.Z *= 35 * -AR_NewRise; // Steering is between -1 and 1
    with
    Code:
    AR_ForceRotationVectX *= 35 * -AR_NewRise; // Steering is between -1 and 1
    is simply an improvement to make the code more readable.

    I commented
    Code:
     // AR_ForceRotationVectX *= 35 * -AR_NewRise; // AR_NewRise is between -1 and 1
    because I want to use Q and E (if you have adopted Syphon's bindings) or the default Jump and Crouch buttons for forward movement. As a consquence the plane won't be able to roll.
    No complains please, this is just a quick and dirty version. I would never use such keyboard layout for a plane if I were serious.

    The magic happens here:
    Code:
    // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    I use the input variable AR_NewRise to calculate the forward movement. Yeah I know, the name AR_NewRise doesn't fit anymore.

    If you are unfamiliar with vector math you must learn it. No way around it.

    Now you should have a vehicle that can turn left/right & up/down and move forward/backward.

    And now I am done with this post, it took me long enough.^^
    Last edited by Hiredicespecter; 10-04-2011 at 04:25 AM.

  23. #23
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Thank you for your much needed help : ) but I am still running into problems to aid you with this problem I have uploaded a video showing the aircraft and how it handles.

    I hope we can get this fixed. Thanks.

    http://www.youtube.com/watch?v=qiEh4cMcIUg

  24. #24
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    I still need your help someone please.

  25. #25
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Here's a video showing the handling of the aircraft. It handles like a balloon which I have no control over because seriously it just goes up and thats it.



    http://www.youtube.com/watch?v=qiEh4cMcIUg

    Help please.

    Thanks.

  26. #26
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Anyone please help.

  27. #27
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    I found the mistake, change the line
    Code:
     // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + AR_NewRise * AR_ForwardsNormal;
    to
    Code:
     // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    I underestimated the force needed to move the Cicada. So you just need to multipy it by 5 to get a decent result.
    I have corrected the mistake in the previously posted code, too.

    This will give you a simple spaceship/plane/whatsoever.

    Things that you still need to do:
    -Write your own vehicle camera code, a good tutorial is here: http://forums.epicgames.com/threads/...ehicle-Cameras
    -Make the input/movement more plane like, something similar to hawx would be easy: Roll with A/D (steering), Pitch with W/S (Throttle), Forward/backward: Space/C (AR_NewRise) and a default forward speed

    Consider these your homework^^
    Last edited by Hiredicespecter; 10-04-2011 at 04:26 AM.

  28. #28
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    It still doesn't work. Acts exactly the same the as before.

  29. #29
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    What keys did you press and what key bindings do you use? The default udk (space and C) ones or the ones proposed by Syphon (q and e)?
    If key binding is not the issue here, replace
    Code:
      // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    with
    Code:
      // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_ForwardsNormal;
    This should make the Cicada move forward without any player input as long as you are in it.
    Another reason might gravity. Is your Cicada placed in a large GravityVolume with Gravity set to 0?

    These are the only reasons I can think of, because I used the code you posted before and posted exactly the code I used.

  30. #30
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,286

    Default

    Just a minor observation, but AR_UpwardsNormal * 0 is redundant and can be removed.

  31. #31
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    You are right. I just left it there for later usage, because a spaceship code would have use for that later on. But a plane's doesn't, I forgot about that.^^

  32. #32
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Did you use my content and factory code too?

  33. #33
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    I did. Now please answer my previouly posted questions or otherwise I won't be able to help you.

    Quote Originally Posted by Hiredicespecter View Post
    What keys did you press and what key bindings do you use? The default udk (space and C) ones or the ones proposed by Syphon (q and e)?
    If key binding is not the issue here, replace
    Code:
      // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    with
    Code:
      // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_ForwardsNormal;
    This should make the Cicada move forward without any player input as long as you are in it.
    Another reason might gravity. Is your Cicada placed in a large GravityVolume with Gravity set to 0?

    These are the only reasons I can think of, because I used the code you posted before and posted exactly the code I used.

  34. #34
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    I use a custom default one; but should I change to syphon's ones?

  35. #35
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    There is no need to change your key bindings as long as the UTPawn behaves properly (it can jump, crouch & walk).
    Which keys do you use for jumping and crouching? What happens if you hold down one of them while inside the Cicada?
    Last edited by Hiredicespecter; 10-06-2011 at 11:11 AM.

  36. #36
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Nothing - no response.

  37. #37
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    Please answer all questions I make in a post. Not just one.

    Otherwise locating your problem will take a very long time.

    In order to decide whetever your problem is input related or not, please answer all of the following questions:
    -Does your UTPawn properly walk, crouch and jump?
    -Which keys do you use for jumping and crouching?
    -What happens if you replace
    Code:
      // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_NewRise * AR_ForwardsNormal;
    with
    Code:
     // The magic happens here
    AR_ForceApplication = AR_UpwardsNormal * 0 + 5 * AR_ForwardsNormal;
    ?

  38. #38
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Yes my UTPawn does all 3. The key to crouch is left shift and the key to jump is space. Nothing happens it seems to act exactly the same.

  39. #39
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    155

    Default

    Quote Originally Posted by GentlemenGraphics View Post
    Nothing happens it seems to act exactly the same.
    You mean that nothing changes after you have changed the code in the way I suggested?

  40. #40
    Banned
    Join Date
    Aug 2011
    Posts
    311

    Default

    Yes that is right nothing different occurs.


 
Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.