Jump to content

Josh

Staff
  • Posts

    24,768
  • Joined

  • Last visited

Profile Information

  • Location
    USA

Recent Profile Visitors

1,496,314 profile views

Josh's Achievements

Grand Master

Grand Master (14/14)

  • Well Followed
  • Dedicated
  • Conversation Starter
  • Reacting Well
  • Problem Solver

Recent Badges

15.6k

Reputation

838

Community Answers

  1. Yes, the color attachment function has an optional index parameter. The depth attachment function currently does not have this parameter. I will look into adding the cubemap face index for the depth attachment method.
  2. What does your different shader output? Sometimes it is easier just to use a post-processing effect or turn the distance fog up all the way. This is how I do the orange outlines in the editor.
  3. It is probably possible to set up six cameras that each draw to a different texture buffer. The texture buffer class can accept an index when a color texture is applied to it, so each texture buffer could render to a different cubemap face: https://www.ultraengine.com/learn/TextureBuffer_SetColorAttachment?lang=cpp This functionality is not in the SetDepthTexture command, but I could probably add it without much trouble.
  4. Both the points lights and the GI probe renderer in the editor render to all sides of a cubemap. What do you plan to use this functionality for?
    A useful tool! Just make sure you are using Blender version 4.0.
  5. I wanted to make a character's feet align to the ground when standing on a slope or on stairs. This was very easy to get a basic version set up. The code here only handles the feet, so the legs currently will get stretched out. Each model may require a little bit different final rotation. The next step is to adjust the knee bones. The hip, knee, and foot form a triangle. One of the constructors for the Plane class accepts three points in space, so those three bones can be used to find a plane. Then you transform their positions to a matrix facing in the direction of the plane normal, solve the triangle, transform back, and that's how IK works. void MyComponent::UpdateFeet() { auto entity = GetEntity(); auto world = entity->GetWorld(); if (not world) return; for (int n = 0; n < footbones.size(); ++n) { if (not footbones[n]) continue; auto pos = footbones[n]->GetPosition(true); pos.y = 0; pos = TransformPoint(pos, entity, NULL); auto pickmode = entity->GetPickMode(); entity->SetPickMode(PICK_NONE); auto pickinfo = world->Pick(pos + Vec3(0, footradius + 0.75, 0), pos - Vec3(0, footreach, 0), footradius, true); entity->SetPickMode(pickmode); if (pickinfo.entity) { pos = TransformPoint(pickinfo.position, NULL, entity); footbones[n]->SetPosition(pos, true); Vec3 normal = TransformNormal(pickinfo.normal, NULL, entity); footbones[n]->AlignToVector(-normal, 1); footbones[n]->Turn(0, 180, 0); } } }
  6. Here is a request in the Recast repo to add the same thing: https://github.com/recastnavigation/recastnavigation/issues/143 I emailed the author. The biggest issue I think would probably be the agent getting caught on things due to their wider turn.
  7. 0.9.9 Some navmesh behavior is improved. NavAgent::Navigate and NavMesh::PlotPath now both take two additional arguments: Navigate(const Vec3& point, const int maxsteps, const float maxdistance) Also added Hmd::SetScale(), which accepts a single float value that will scale the VR player.
  8. 0.9.9 NavMesh::PlotPath now has an extra parameter for the maximum number of steps. NavAgent::Navigate() will produce better results now, and return false if a path to the destination point cannot be reached. Added NavAgent::GetDestination(), GetPosition(), GetRotation(), and GetQuaternion(). Added Bone::AlignToVector, uses the same arguments as Entity::AlignToVector. Game builds will now correctly load the material normal scale value.
  9. This should be possible, but you need to add any new entities to the scene yourself. The scene does not include every entity in the world automatically.
  10. You can call world:RecordStats(true) to enable stats and then check the value of world.physicsstats.physicstime and see if it is taking more than 16 milliseconds.
  11. It could be game logic or physics. I would guess physics, since that is more likely to hit the limit first.
  12. 0.9.9 Added Entity:SetGravity, to override the world gravity setting. Default value is Vec3(NAN). Added Entity:SetSoftness method. Default value is 0.1. Added support for loading glTF files that use Google's Draco mesh compression extension. This makes Ultra compatible with Google Earth 3D tiles. You must add this header search path to your existing C++ projects: $(ULTRAENGINE)\Include\Libraries\Draco\src
  13. 0.9.9 Editor will now save and load the material normal scale setting. Only the editor is updated at this time.
×
×
  • Create New...