本人制作车辆驾驶仿真,发现无法瞬移车辆,提示Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag警告,摸索一天总算解决了。直接上代码:USkeletalMeshComponent * uS = (USkeletalMeshComponent *)pACarPawn->GetMovementComponent();us->MoveComponent(pos,rot,false,nullptr,MOVECOMP_IgnoreBases, ETeleportType::TeleportPhysics);
主要是要设置MOVECOMP_IgnoreBases, ETeleportType::TeleportPhysics这两个状态。希望对大家有用。