Added custom car collision in raycast sensors

This commit is contained in:
Marc Garcia Puig 2020-06-15 15:06:09 +02:00
parent f6831da92e
commit 281461ebbf
3 changed files with 8 additions and 3 deletions

View File

@ -96,4 +96,9 @@ InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
[/Script/Engine.CollisionProfile]
+Profiles=(Name="CustomSensorCollision",CollisionEnabled=QueryOnly,bCanModify=True,ObjectTypeName="SensorObject",CustomResponses=((Channel="WorldStatic",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore),(Channel="SensorObject"),(Channel="SensorTrace")),HelpMessage="Used for custom collision meshes for objects that has very complex meshes but we want them to appear in raycast based sensors")
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=False,bStaticObject=False,Name="SensorObject")
+DefaultChannelResponses=(Channel=ECC_GameTraceChannel2,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="SensorTrace")
+EditProfiles=(Name="BlockAll",CustomResponses=((Channel="SensorObject"),(Channel="SensorTrace")))
+EditProfiles=(Name="OverlapAll",CustomResponses=((Channel="SensorObject",Response=ECR_Overlap),(Channel="SensorTrace",Response=ECR_Overlap)))

View File

@ -125,7 +125,7 @@ void ARadar::SendLineTraces(float DeltaTime)
OutHit,
RadarLocation,
EndLocation,
ECC_MAX,
ECC_GameTraceChannel2,
TraceParams,
FCollisionResponseParams::DefaultResponseParam
);

View File

@ -152,7 +152,7 @@ bool ARayCastLidar::ShootLaser(const uint32 Channel, const float HorizontalAngle
HitInfo,
LidarBodyLoc,
EndTrace,
ECC_MAX,
ECC_GameTraceChannel2,
TraceParams,
FCollisionResponseParams::DefaultResponseParam
);